/* Hide legacy bioguide ID label if an older template left it in the DOM. */
.app-cm-bioguide {
  display: none !important;
}

.app-cm-profile,
.app-cm-bill-panel,
.app-cm-bill-panel-host,
.app-cm-sponsors-host,
.app-cm-directory,
.app-cm-directory-page {
  --app-cm-ink: #0c1e5a;
  --app-cm-accent: #e71425;
  --app-cm-gold: #f6cf46;
  --app-cm-muted: #5b6475;
  --app-cm-line: rgba(12, 30, 90, 0.12);
  --app-cm-paper: #f3f5f9;
  --app-cm-panel: #1251d8;
}

.app-cm-profile {
  margin: 0 0 2.5rem;
  color: var(--app-cm-ink);
}

body.single-app_congress_member .entry-header,
body.single-app_congress_member .page-header,
body.post-type-archive-app_congress_member .page-header .entry-title,
body.single-app_congress_member .entry-meta,
body.single-app_congress_member .featured-image,
body.single-app_congress_member .post-image {
  display: none !important;
}

body.single-app_congress_member .site-content,
body.post-type-archive-app_congress_member .site-content {
  max-width: 920px;
}

body.single-app_congress_member.right-sidebar .content-area,
body.single-app_congress_member.left-sidebar .content-area {
  width: 100%;
}

.app-cm-profile__header {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: end;
  padding: 1.35rem 1.35rem 1.55rem;
  background:
    linear-gradient(145deg, #0a1a4d 0%, #0c1e5a 48%, rgba(231, 20, 37, 0.72) 100%);
  color: #fff;
  border-radius: 2px;
}

.app-cm-profile__photo,
.app-cm-profile__photo-fallback {
  width: 200px;
  height: 245px;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.app-cm-profile__photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-cm-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--app-cm-gold);
  font-weight: 700;
}

.app-cm-profile__name {
  margin: 0 0 0.55rem;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.05;
  color: #fff;
  font-weight: 700;
  overflow-wrap: anywhere;
  min-width: 0;
}

.app-cm-profile__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.app-cm-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
}

.app-cm-profile__role {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.app-cm-contact {
  margin-top: 1.35rem;
  padding: 1.25rem 1.35rem 1.4rem;
  background: var(--app-cm-paper);
  border-top: 3px solid var(--app-cm-ink);
}

.app-cm-contact__head {
  margin-bottom: 1rem;
}

.app-cm-contact__head h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-cm-ink);
}

.app-cm-contact__building {
  margin: 0.35rem 0 0;
  color: var(--app-cm-muted);
  font-size: 0.95rem;
}

.app-cm-contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.app-cm-contact__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-cm-muted);
  font-weight: 700;
}

.app-cm-contact__value {
  margin: 0;
  font-style: normal;
  color: var(--app-cm-ink);
  line-height: 1.45;
}

.app-cm-contact__value a {
  color: var(--app-cm-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.app-cm-contact__value a:hover {
  color: var(--app-cm-accent);
}

.app-cm-related {
  margin-top: 1.75rem;
}

.app-cm-related h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-cm-ink);
}

.app-cm-bill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--app-cm-line);
}

.app-cm-bill-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--app-cm-line);
}

.app-cm-bill-list a {
  color: var(--app-cm-ink);
  font-weight: 700;
  text-decoration: none;
}

.app-cm-bill-list a:hover {
  color: var(--app-cm-accent);
}

.app-cm-bill-no {
  color: var(--app-cm-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.app-cm-bill-role {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--app-cm-line);
  border-radius: 999px;
  color: var(--app-cm-ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.post-type-archive-app_congress_member .page-header,
body.post-type-archive-app_congress_member .entry-header,
body.post-type-archive-app_congress_member .site-main > article {
  display: none !important;
}

body.post-type-archive-app_congress_member .site-content,
body.post-type-archive-app_congress_member .content-area,
body.post-type-archive-app_congress_member .site-main {
  max-width: 1120px;
  width: 100%;
}

.app-cm-directory-page {
  margin: 0 0 3rem;
  color: var(--app-cm-ink);
}

.app-cm-directory-hero {
  padding: 1.6rem 1.5rem 1.7rem;
  margin-bottom: 1.75rem;
  background:
    linear-gradient(145deg, #0a1a4d 0%, #0c1e5a 52%, rgba(231, 20, 37, 0.7) 100%);
  color: #fff;
}

.app-cm-directory-hero .app-cm-kicker {
  color: var(--app-cm-gold);
}

.app-cm-directory-hero__title {
  margin: 0 0 0.45rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
  font-weight: 700;
  color: #fff;
}

.app-cm-directory-hero__lede {
  margin: 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.app-cm-directory-hero__count {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.app-cm-directory-section {
  margin-bottom: 2.25rem;
}

.app-cm-directory-section__head {
  margin-bottom: 1rem;
}

.app-cm-directory-section__head h2 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-cm-directory-section__head p {
  margin: 0;
  color: var(--app-cm-muted);
}

.app-cm-directory-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding: 0.95rem;
  background: var(--app-cm-paper);
  border-top: 3px solid var(--app-cm-ink);
}

.app-cm-directory-filters__field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--app-cm-muted);
}

.app-cm-directory-filters__field input,
.app-cm-directory-filters__field select {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid var(--app-cm-line);
  background: #fff;
  color: var(--app-cm-ink);
  padding: 0.45rem 0.65rem;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}

.app-cm-directory-filters__field input:focus-visible,
.app-cm-directory-filters__field select:focus-visible {
  outline: 2px solid var(--app-cm-ink);
  outline-offset: 1px;
}

.app-cm-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}

.app-cm-directory--featured {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-bottom: 0.5rem;
}

.app-cm-directory-empty {
  margin: 1rem 0 0;
  color: var(--app-cm-muted);
}

.app-cm-card {
  background: #fff;
  border: 1px solid var(--app-cm-line);
  border-top: 3px solid var(--app-cm-ink);
  overflow: hidden;
  min-width: 0;
}

.app-cm-card--featured {
  border-top-color: var(--app-cm-accent);
  box-shadow: 0 10px 24px rgba(12, 30, 90, 0.08);
}

.app-cm-card__link {
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.95rem;
  align-items: center;
}

.app-cm-card__frame {
  width: 96px;
  height: 96px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--app-cm-line);
  box-shadow: inset 0 0 0 1px rgba(12, 30, 90, 0.04);
}

.app-cm-card__photo,
.app-cm-card__photo-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: var(--app-cm-paper);
}

.app-cm-card__photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--app-cm-ink);
}

.app-cm-card__badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--app-cm-accent);
}

.app-cm-card__name {
  margin: 0 0 0.25rem;
  font-size: 1.08rem;
  line-height: 1.25;
  color: var(--app-cm-ink);
  overflow-wrap: anywhere;
}

.app-cm-card__meta,
.app-cm-card__locale,
.app-cm-card__bills {
  margin: 0;
  color: var(--app-cm-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.app-cm-card__locale {
  margin-top: 0.2rem;
  font-weight: 700;
  color: var(--app-cm-ink);
}

.app-cm-card__bills {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Legislation KEY BILL DATA replacement — self-contained blue panel */
.app-cm-bill-panel-host,
.gb-element-271240e3.app-cm-bill-panel-host,
.app-cm-sponsors-host {
  background: #1251d8 !important;
  background-image: none !important;
  color: #fff !important;
  padding: 1.15rem 1.2rem 1.3rem !important;
}

.app-cm-bill-panel {
  background: #1251d8;
  color: #fff;
  padding: 0;
  box-sizing: border-box;
}

.app-cm-bill-panel-host .app-cm-bill-panel {
  background: transparent;
}

.app-cm-bill-panel__title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
}

.app-cm-sponsors__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--app-cm-gold);
}

.app-cm-sponsors__fallback {
  margin: 0 0 1rem;
  line-height: 1.4;
}

.app-cm-sponsor-cards {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.app-cm-sponsor-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.app-cm-sponsor-card:hover,
.app-cm-sponsor-card:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  outline: none;
}

.app-cm-sponsor-card__frame {
  width: 72px;
  height: 72px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.app-cm-sponsor-card__photo,
.app-cm-sponsor-card__photo-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: rgba(0, 0, 0, 0.18);
}

.app-cm-sponsor-card__photo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--app-cm-ink);
  background: #e8ecf5;
}

.app-cm-sponsor-card__body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.app-cm-sponsor-card__role {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-cm-gold);
  font-weight: 700;
}

.app-cm-sponsor-card__name {
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  color: #fff;
}

.app-cm-sponsor-card__meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
}

.app-cm-bill-panel__facts {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.app-cm-bill-panel__fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.app-cm-bill-panel__fact dt {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
}

.app-cm-bill-panel__fact dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  color: #fff;
}

.app-cm-bill-panel__accent {
  color: var(--app-cm-gold) !important;
}

.app-cm-member-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

@media (max-width: 900px) {
  .app-cm-directory-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .app-cm-profile__header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .app-cm-profile__photo,
  .app-cm-profile__photo-fallback {
    width: 140px;
    height: 172px;
  }

  .app-cm-contact__grid,
  .app-cm-bill-list li,
  .app-cm-bill-panel__fact,
  .app-cm-directory-filters {
    grid-template-columns: 1fr;
  }

  .app-cm-bill-panel__fact dd {
    text-align: left;
  }

  .app-cm-card__link {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .app-cm-card__frame {
    width: 80px;
    height: 80px;
  }
}

/* Legislation archive: Issue select sits beside Congress. */
.app-cm-issue-filter {
  display: inline-block;
  vertical-align: top;
  margin-left: 0.75rem;
}

@media (max-width: 640px) {
  .app-cm-issue-filter {
    display: block;
    margin-left: 0;
    margin-top: 0.75rem;
  }
}
