:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #10233f;
  --muted: #5f6e82;
  --line: #cfd8e6;
  --panel: #ffffff;
  --panel-soft: #f3f6fb;
  --brand: #173e7a;
  --brand-strong: #0b2856;
  --accent: #c82032;
  --accent-dark: #971928;
  --sky: #d8e7ff;
  --shadow: 0 18px 48px rgba(12, 32, 72, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 80px, rgba(200, 32, 50, 0.15), transparent 260px),
    linear-gradient(135deg, rgba(23, 62, 122, 0.18), rgba(255, 255, 255, 0) 420px),
    #eef3fa;
  color: var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(23, 62, 122, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 62, 122, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 520px);
  column-gap: 28px;
  row-gap: 6px;
  align-items: start;
  min-height: 220px;
  border-top: 7px solid var(--accent);
  padding-top: 16px;
}

.hero-copy {
  display: contents;
  min-width: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.brand-title {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--brand-strong);
  text-transform: uppercase;
}

.hero-side {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 8px;
  align-self: start;
  width: 100%;
}

.site-logo {
  display: block;
  justify-self: center;
  height: auto;
  object-fit: contain;
}

.site-logo-mobile {
  display: none;
}

.site-logo-desktop {
  width: min(100%, 500px);
  max-height: 370px;
}

.lede {
  grid-column: 1;
  grid-row: 2;
  max-width: 720px;
  margin-bottom: 0;
  color: #334052;
  font-size: 1.13rem;
  line-height: 1.55;
}

.hero-panel,
.controls,
.bill-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  padding: 18px;
  border-top: 4px solid var(--brand);
  background:
    linear-gradient(135deg, rgba(23, 62, 122, 0.08), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.94);
}

.hero-panel strong,
.hero-panel span:last-child {
  display: block;
}

.hero-panel span:last-child {
  margin-top: 3px;
  color: var(--muted);
}

.landing-page {
  display: none;
  gap: 20px;
  margin-top: 28px;
}

.route-home .landing-page {
  display: grid;
}

.route-home .controls,
.route-home .dashboard,
.route-home .mode-tabs {
  display: none;
}

.route-home #lastUpdated {
  display: none;
}

.route-home .hero-panel {
  display: none;
}

.bill-detail-page {
  display: none;
}

.route-bill-detail .landing-page,
.route-bill-detail .controls,
.route-bill-detail .dashboard,
.route-representative-detail .landing-page,
.route-representative-detail .controls,
.route-representative-detail .dashboard {
  display: none;
}

.route-bill-detail #billDetailPage,
.route-representative-detail #representativeDetailPage {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.landing-copy {
  max-width: 760px;
}

.landing-kicker {
  margin-bottom: 7px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.landing-copy h2 {
  margin-bottom: 8px;
  color: var(--brand-strong);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.landing-copy p:last-child {
  margin-bottom: 0;
  color: #334052;
  font-size: 1rem;
  line-height: 1.55;
}

.landing-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.landing-action {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 142px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 62, 122, 0.08), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 16px;
  text-decoration: none;
}

.landing-action:hover {
  transform: translateY(-1px);
}

.landing-action-primary,
.landing-action-alert {
  border-top-color: var(--accent);
}

.landing-action span {
  color: var(--brand-strong);
  font-size: 1.05rem;
  font-weight: 900;
}

.landing-action small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.radar-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 2px solid rgba(23, 62, 122, 0.46);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--accent) 0 3px, transparent 4px),
    repeating-radial-gradient(circle, transparent 0 11px, rgba(23, 62, 122, 0.22) 12px 13px),
    conic-gradient(from 315deg, rgba(200, 32, 50, 0.42), transparent 58deg);
}

.radar-mark::before,
.radar-mark::after {
  position: absolute;
  background: var(--brand);
  content: "";
}

.radar-mark::before {
  width: 2px;
  height: 42px;
  left: 23px;
  top: 3px;
  opacity: 0.45;
}

.radar-mark::after {
  width: 42px;
  height: 2px;
  left: 3px;
  top: 23px;
  opacity: 0.45;
}

.mode-tabs {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}

.mode-tab,
.mode-tab-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.74);
  color: var(--brand-strong);
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.mode-tab:hover,
.mode-tab-menu-button:hover {
  background: #fff;
  color: var(--accent-dark);
}

.mode-tab.is-active,
.mode-tab-menu-button.is-active {
  background: var(--brand);
  color: #fff;
}

.route-home .mode-tab[data-tab="home"],
.route-federal .mode-tab[data-tab="federal"],
.route-executive .mode-tab[data-tab="executive"],
.route-representatives .mode-tab[data-tab="representatives"],
.route-natca-pac .mode-tab-menu-button,
.route-congressional-calendar .mode-tab-menu-button,
.route-staffing-map .mode-tab-menu-button,
.route-action-center .mode-tab-menu-button,
.route-contact .mode-tab-menu-button {
  background: var(--brand);
  color: #fff;
}

.mode-tab-menu {
  position: relative;
}

.mode-tab-menu-list {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  z-index: 10;
  display: none;
  min-width: 250px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(6, 30, 65, 0.14);
  overflow: hidden;
}

.mode-tab-menu.is-open .mode-tab-menu-list {
  display: grid;
}

.mode-tab-menu-item {
  width: 100%;
  border: 0;
  border-radius: 0;
  justify-content: flex-start;
  text-align: left;
}

.controls {
  margin-top: 0;
  padding: 18px;
  border-top-left-radius: 0;
}

.control-row {
  display: flex;
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
}

.control-row:last-child {
  margin-bottom: 0;
}

.rep-search-or {
  display: none;
  align-self: center;
  margin-bottom: 10px;
  color: #6b7a90;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rep-search-hint {
  display: none;
  margin: 2px 0 0;
  color: #5e6f86;
  font-size: 0.83rem;
  line-height: 1.4;
}

.calendar-controls {
  display: none;
  gap: 14px;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.segmented-control,
.calendar-month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.segmented-control {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  padding: 0 14px;
  font-weight: 850;
}

.segmented-control button.is-active {
  background: var(--brand);
  color: #fff;
}

.calendar-month-nav strong {
  min-width: 180px;
  color: var(--brand-strong);
  font-size: 1.35rem;
  line-height: 1.15;
  text-align: center;
}

.calendar-filter-dropdown {
  position: relative;
  width: min(100%, 260px);
}

.calendar-filter-dropdown summary {
  min-height: 44px;
  border: 1px solid #bdc8d8;
  border-radius: 6px;
  background: #fff;
  color: var(--brand-strong);
  padding: 11px 14px;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
}

.calendar-filter-dropdown[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.calendar-filter-menu {
  position: absolute;
  z-index: 20;
  width: 100%;
  border: 1px solid #bdc8d8;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(19, 45, 83, 0.16);
  padding: 8px;
}

.calendar-filter-menu label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  border-radius: 5px;
  padding: 8px;
  color: var(--brand-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.calendar-filter-menu label:hover {
  background: #f3f7fd;
}

.calendar-filter-menu input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.loading-state {
  border: 1px dashed #b8c7db;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #47566a;
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c5cedb;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button {
  border: 1px solid #b6c2d4;
  background: #f5f8fc;
  color: var(--brand-strong);
}

.secondary-button:hover {
  background: #eaf1ff;
  color: var(--brand-strong);
}

.dashboard {
  display: block;
  margin-top: 22px;
}

.build-stamp-bar {
  width: min(1120px, 92vw);
  margin: 16px auto 26px;
  color: var(--muted);
  text-align: right;
  font-size: 0.78rem;
  font-weight: 650;
}

.results-header h2 {
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

#resultStatus {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-list {
  display: grid;
  gap: 18px;
}

.status-section {
  display: grid;
  gap: 10px;
}

.status-section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 0 2px 9px;
  padding-left: 12px;
}

.status-section-header h3 {
  margin-bottom: 3px;
  font-size: 1rem;
}

.status-section-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.status-count {
  min-width: 34px;
  border: 1px solid #cbd5df;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-strong);
  color: #fff;
  padding: 5px 10px;
  text-align: center;
  font-weight: 850;
}

.status-card-list {
  display: grid;
  gap: 14px;
}

.bill-card {
  padding: 18px;
  border-left: 5px solid var(--brand);
}

.bill-topline {
  display: block;
  margin-bottom: 12px;
}

.tag {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 850;
}

.tag {
  background: #eaf1ff;
  color: var(--brand-strong);
}

.bill-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.bill-detail-content {
  display: grid;
  gap: 16px;
}

.bill-detail-card {
  display: grid;
  gap: 16px;
}

.bill-detail-card h2 {
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.05;
}

.representative-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.representative-detail-photo {
  width: 96px;
  height: 112px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #c3cfdf;
  background: #f4f7fb;
  flex-shrink: 0;
}

.representative-detail-header h2 {
  margin: 0 0 6px;
}

.bill-detail-summary {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.bill-detail-grid,
.bill-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bill-detail-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  padding: 12px;
}

.bill-detail-box dt,
.bill-detail-box .box-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bill-detail-box dd,
.bill-detail-box .box-value {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.bill-detail-section {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}

.bill-detail-section summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--brand-strong);
  font-weight: 850;
}

.bill-detail-section[open] summary {
  border-bottom: 1px solid var(--line);
}

.bill-detail-section > :not(summary) {
  margin: 0;
  padding: 12px;
}

.bill-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.bill-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bill-detail-list li {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}

.bill-detail-list time,
.bill-detail-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.back-link,
.detail-page-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 1px solid #b6c2d4;
  border-radius: 6px;
  background: #f5f8fc;
  color: var(--brand-strong);
  font-weight: 850;
  padding: 6px 10px;
  text-decoration: none;
}

.back-link:hover,
.detail-page-link:hover {
  background: #e9f0fa;
}

.sponsor-page-link {
  width: 100%;
  margin-top: 10px;
  border-color: var(--brand);
  background: #fff;
}

.sponsor-detail-box {
  display: grid;
  align-content: start;
}

.sponsor-detail-box.has-sponsor-link {
  cursor: pointer;
}

.sponsor-detail-box.has-sponsor-link:hover {
  border-color: var(--brand);
  background: #f4f8ff;
}

.sponsor-detail-box.has-sponsor-link:focus-visible {
  outline: 3px solid rgba(31, 74, 136, 0.28);
  outline-offset: 2px;
}

.rep-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rep-name-row h3 {
  margin-bottom: 0;
}

.rep-photo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #c3cfdf;
  background: #f4f7fb;
  flex-shrink: 0;
}

.rep-contact {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.rep-staff-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.rep-staff-list li {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}

.rep-social {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}

.rep-social-label {
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.rep-social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rep-social-link {
  border: 1px solid #c7d3e3;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
  padding: 7px 10px;
  text-decoration: none;
}

.rep-social-link:hover {
  border-color: var(--brand);
  background: #eef5ff;
}

.rep-votes,
.rep-committees {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  padding: 10px 12px;
}

.rep-votes summary,
.rep-committees summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-weight: 850;
}

.rep-vote-list,
.rep-committee-list {
  display: grid;
  gap: 10px;
  padding: 10px 0 0;
  margin: 0;
  list-style: none;
}

.rep-vote-list li,
.rep-committee-list > li {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.rep-committee-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--brand-strong);
  font-weight: 850;
}

.rep-committee-role {
  border-radius: 999px;
  background: #eaf1fb;
  color: #17447f;
  font-size: 0.72rem;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}

.rep-subcommittee-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: #334052;
  font-size: 0.92rem;
}

.rep-vote-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rep-vote-main .source-link {
  overflow-wrap: anywhere;
}

.rep-vote-meta {
  margin-top: 4px;
  font-size: 0.9rem;
}

.vote-pill {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.vote-pill.is-yes {
  background: #e7f6ed;
  color: #17633a;
}

.vote-pill.is-no {
  background: #fde9ec;
  color: #9b1428;
}

.vote-pill.is-present {
  background: #fff5db;
  color: #745100;
}

.vote-pill.is-not-voting,
.vote-pill.is-unavailable {
  background: #eef2f6;
  color: #526070;
}

.detail-block {
  margin: 12px 0 16px;
}

.description-details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}

.description-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 0.9rem;
  list-style-position: inside;
}

.description-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.description-heading {
  display: inline-block;
  margin: 0;
  color: var(--brand-strong);
  font-size: inherit;
  font-weight: 850;
}

.description-details .description {
  padding: 10px 12px 12px;
}

.description {
  margin: 0;
  color: #2f3b4c;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.pac-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.pac-summary-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  padding: 12px;
}

.pac-summary-grid dd {
  color: var(--brand-strong);
  font-size: 1.3rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.pac-ranking-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 1.4rem;
}

.pac-ranking-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.pac-ranking-list li:last-child {
  border-bottom: 0;
}

.pac-ranking-name {
  display: block;
  color: var(--brand-strong);
  font-weight: 850;
}

.pac-ranking-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 750;
}

.calendar-month-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.calendar-event-card.priority-high {
  border-left-color: var(--accent);
  box-shadow: 0 18px 48px rgba(151, 25, 40, 0.18);
}

.calendar-event-topline {
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--brand-strong);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.priority-badge {
  background: var(--accent);
  color: #fff;
}

.calendar-event-date {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 850;
}

.calendar-event-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.calendar-related-bill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-bill-detail-link {
  font-size: 0.82rem;
  padding: 5px 9px;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.calendar-day-heading,
.calendar-day {
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
}

.calendar-day-heading {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 132px;
}

.calendar-day.is-empty {
  background: rgba(244, 248, 253, 0.68);
}

.calendar-day.has-events {
  background: #fff;
}

.calendar-day > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-strong);
}

.calendar-day-event {
  display: block;
  width: 100%;
  min-height: 0;
  margin-top: 6px;
  border: 1px solid rgba(23, 62, 122, 0.16);
  border-radius: 5px;
  background: #f3f7fd;
  color: var(--brand-strong);
  padding: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

.calendar-day-event.priority-high {
  border-color: rgba(200, 32, 50, 0.34);
  background: #fff2f4;
  color: var(--accent-dark);
}

.calendar-day-more {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: #2f3b4c;
  line-height: 1.45;
}

.source-link {
  color: var(--accent-dark);
  font-weight: 850;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.bill-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-collapsible {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}

.card-collapsible summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 0.9rem;
}

.card-collapsible[open] summary {
  border-bottom: 1px solid var(--line);
}

.related-measure-list {
  margin: 0;
  padding: 10px 22px 12px;
  display: grid;
  gap: 8px;
}

.related-measure-list li,
.related-measure-list li {
  color: #2f3b4c;
  line-height: 1.4;
}

.empty-state,
.error-state {
  border: 1px dashed #bdc7d5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 24px;
  color: var(--muted);
  line-height: 1.5;
}

.error-state {
  border-color: #dc9a8a;
  color: #8c361f;
}

.timeline-modal,
.calendar-event-modal {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(760px, calc(100vw - 24px));
}

.timeline-modal::backdrop,
.calendar-event-modal::backdrop {
  background: rgba(18, 34, 64, 0.48);
}

.timeline-modal-card,
.calendar-event-modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.timeline-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.timeline-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-strong);
}

.calendar-event-modal-body .calendar-event-card {
  position: relative;
  box-shadow: none;
  padding-top: 58px;
}

.calendar-event-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.modal-close,
.timeline-button {
  border: 1px solid #b6c2d4;
  background: #f5f8fc;
  color: var(--brand-strong);
  font-weight: 800;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}

.modal-close:hover,
.timeline-button:hover {
  background: #e9f0fa;
}

.timeline-details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}

.timeline-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 0.9rem;
}

.timeline-list {
  margin: 0;
  padding: 0 18px 12px 30px;
  display: grid;
  gap: 10px;
}

.timeline-date {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.facility-map-shell {
  display: grid;
  gap: 18px;
}

.facility-map-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.facility-filter-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.facility-filter-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b9c7d8;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 750;
  text-transform: none;
}

.facility-map-wrap {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.facility-map {
  width: 100%;
  height: 520px;
}

.facility-map-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--muted);
}

.facility-map-summary strong {
  color: var(--brand-strong);
}

.facility-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.facility-list-item {
  display: grid;
  gap: 5px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 13px 14px;
  color: inherit;
  text-decoration: none;
}

.facility-list-item:hover,
.facility-list-item:focus-visible {
  border-left-color: var(--accent);
  box-shadow: 0 10px 28px rgba(12, 32, 72, 0.13);
}

.facility-list-item strong {
  color: var(--brand-strong);
}

.facility-list-item span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.facility-detail-card .bill-detail-section {
  margin-top: 16px;
}

.facility-operations-trend {
  display: grid;
  gap: 8px;
}

.facility-trend-row {
  display: grid;
  grid-template-columns: 100px minmax(80px, 1fr) 88px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.facility-trend-bar {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #6fac32);
}

.facility-trend-row strong {
  color: var(--brand-strong);
  text-align: right;
}

@media (max-width: 820px) {
  .hero,
  dl,
  .bill-detail-grid,
  .bill-detail-stats {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 20px;
    align-items: start;
  }

  .hero-copy {
    display: block;
  }

  .pac-summary-grid {
    grid-template-columns: 1fr;
  }

  .control-row,
  .landing-actions,
  .mode-tabs,
  .results-header,
  .status-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-actions {
    grid-template-columns: 1fr;
  }

  .landing-action {
    min-height: 0;
  }

  h1 {
    font-size: clamp(1.55rem, 7.2vw, 2.25rem);
    line-height: 0.96;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
  }

  .brand-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(170px, 48vw, 230px);
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
  }

  .hero-side {
    grid-column: auto;
    grid-row: auto;
    justify-items: center;
    width: 100%;
  }

  .site-logo {
    width: 100%;
    max-height: 210px;
  }

  .site-logo-desktop {
    display: none;
  }

  .site-logo-mobile {
    display: block;
  }

  .hero-panel {
    max-width: 420px;
    margin: 0 auto;
  }

  .mode-tabs {
    gap: 0;
    border-bottom: 0;
  }

  .mode-tab,
  .mode-tab-menu-button {
    width: 100%;
    border-radius: 6px;
    border-bottom: 1px solid var(--line);
  }

  .mode-tab-menu {
    width: 100%;
  }

  .mode-tab-menu-list {
    position: static;
    min-width: 0;
    border-radius: 0 0 6px 6px;
    box-shadow: none;
  }

  .status-count {
    width: max-content;
  }

  .rep-vote-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .representative-detail-header {
    align-items: flex-start;
  }

  .representative-detail-photo {
    width: 72px;
    height: 84px;
  }

  .vote-pill {
    width: max-content;
  }

  .rep-search-or {
    align-self: flex-start;
    margin-bottom: 0;
  }

  .calendar-toolbar,
  .calendar-month-nav,
  .segmented-control {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-month-nav strong {
    min-width: 0;
    text-align: left;
  }

  .calendar-month-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .calendar-month-nav strong {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 6px;
    color: var(--brand-strong);
    font-size: 1.35rem;
    line-height: 1.15;
    text-align: center;
  }

  .calendar-month-nav button {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.86rem;
  }

  .build-stamp-bar {
    margin: 12px auto 22px;
    text-align: center;
    font-size: 0.72rem;
  }

  .calendar-filter-dropdown {
    width: 100%;
  }

  .calendar-filter-menu {
    position: static;
  }

  .calendar-month-scroll {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  .calendar-month-grid {
    width: 100%;
    min-width: 0;
  }

  .calendar-day-heading,
  .calendar-day {
    padding: 6px 4px;
  }

  .calendar-day {
    min-height: 78px;
  }

  .calendar-day > strong {
    margin-bottom: 4px;
    font-size: 0.82rem;
  }

  .calendar-day-event {
    max-height: 36px;
    margin-top: 4px;
    padding: 3px 4px;
    font-size: 0.64rem;
    line-height: 1.15;
    overflow: hidden;
  }

  .calendar-day-more {
    margin-top: 3px;
    font-size: 0.62rem;
  }

  .calendar-event-meta {
    grid-template-columns: 1fr;
  }

  .facility-map-controls,
  .facility-list {
    grid-template-columns: 1fr;
  }

  .facility-map-wrap {
    min-height: 420px;
  }

  .facility-map {
    height: 420px;
  }

  .facility-trend-row {
    grid-template-columns: 82px minmax(60px, 1fr) 74px;
    font-size: 0.78rem;
  }
}

@media (max-width: 520px) {
  .calendar-day-heading,
  .calendar-day {
    padding: 4px 2px;
  }

  .calendar-day-heading {
    font-size: 0.58rem;
  }

  .calendar-day {
    min-height: 58px;
  }

  .calendar-day > strong {
    margin-bottom: 3px;
    font-size: 0.78rem;
  }

  .calendar-day-event {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 20px;
    margin-top: 2px;
    border-radius: 4px;
    padding: 2px 3px;
    color: var(--brand-strong);
    font-size: 0;
    text-align: center;
  }

  .calendar-day-event::after {
    content: attr(data-mobile-label);
    color: inherit;
    font-size: 0.52rem;
    font-weight: 850;
    line-height: 1.1;
  }

  .calendar-day-event.priority-high {
    color: var(--accent-dark);
  }

  .calendar-day-more {
    margin-top: 2px;
    font-size: 0.56rem;
  }
}

@media (max-width: 980px) and (min-width: 821px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  }

  .hero-side {
    justify-items: center;
  }

  .site-logo {
    width: min(100%, 430px);
    max-height: 320px;
  }
}
