.content-wrapper {
    width: 100%;
}

/* ============================================================================
   GLOBAL SELECT
   ============================================================================ */

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2rem;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    color: inherit;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0.5 L5 5.5 L10 0.5 L8.5 0 L5 4 L1.5 0 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0.5 L5 5.5 L10 0.5 L8.5 0 L5 4 L1.5 0 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / contain;
    pointer-events: none;
}

.select-wrapper select {
    display: block;
}

/* ============================================================================
   RATINGS BAR
   Loading animation for the header ratings bar
   ============================================================================ */

#ratings-bar {
  height: 10px;
  min-width: 200px;
  margin: 0 auto;
  border-radius: 0px;
  background: linear-gradient(270deg, #ccc, #eee, #ccc); /* subtle gray gradient */
  background-size: 600% 100%; /* larger for smooth animation */
  animation: gradient-slide 2s ease infinite;
}

#site-header #ratings-bar {
	max-width: none;
	position: relative;
	z-index: 0;
}

/* Keyframes for smooth horizontal gradient movement */
@keyframes gradient-slide {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 0%;
  }
}

.ratings-row {
  width: 100%;
}

.rating-block {
  flex: 0 1 0;
  height: 10px;
  text-align: center;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0s ease, opacity 0.2s ease;
}

a.rating-block {
  text-decoration: none;
}

.ratings-bar-tooltip {
  position: fixed;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 9999;
  transform: translateX(-50%) translateY(-100%) translateY(-8px);
}

.rbt-label {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 500;
  font-family: var(--wp--preset--font-family--centra-no2);
  white-space: nowrap;
  color: var(--wp--preset--color--black);
}

.rbt-count {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border-radius: 50px;
  margin-left: -3px;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 500;
  font-family: var(--wp--preset--font-family--centra-no2);
  color: var(--wp--preset--color--black);
}

.rbt-label.solid-d,
.rbt-label.solid-r,
.rbt-count.solid-d,
.rbt-count.solid-r {
  color: var(--wp--preset--color--white);
}

/* Rating color classes — used by ratings bar, rating blocks, and tables */
.solid-d { background-color: var(--wp--preset--color--democrat-blue); }

.solid-r { background-color: var(--wp--preset--color--republican-red); }

.solid-green { background-color: var(--wp--preset--color--green); }

.solid-third-party { background-color: var(--wp--preset--color--independent-yellow); }

.battle-r { background-color: var(--wp--preset--color--tilt-red); }

.battle-d { background-color: var(--wp--preset--color--tilt-blue); }

.battle-i { background-color: var(--wp--preset--color--light-yellow); }

.bg-default { background-color: var(--wp--preset--color--gray); }


.not-up {
    background-color: var(--wp--preset--color--gray);
}

.likely-d {
    background-color: var(--wp--preset--color--likely-blue);
}
.likely-r {
    background-color: var(--wp--preset--color--likely-red);
}

.lean-d {
    background-color: var(--wp--preset--color--lean-blue);
}

.lean-r {
    background-color: var(--wp--preset--color--lean-red);
}

.lean-i {
    background-color: var(--wp--preset--color--light-yellow);
}

.tilt-d {
    background-color: var(--wp--preset--color--tilt-blue);
}

.tilt-r {
    background-color: var(--wp--preset--color--tilt-red);
}

.toss-up {
    background-color: var(--wp--preset--color--yellow);
}

.no-rating { background-color: var(--wp--preset--color--gray); }
.rating-default { background-color: var(--wp--preset--color--dark-gray); }

/* Post card styling */
.post-card {
    background-color: var(--wp--preset--color--white);
    transition: background-color 0.2s ease;
}

.post-card:hover {
    background-color: #e9ecef;
}

/* Post meta styling */
.post-meta {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--dark-gray);
	font-family: var(--wp--preset--font-family--centra-mono), monospace;
}

.post-meta .post-author {
    margin-top: var(--one-spacer);
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--black);
	font-family: 'Centra No2', sans-serif;
    font-weight: 500;
}

.post-item:last-child {
    border-bottom: none !important;
}

.post-meta .post-author a {
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--black);
	font-family: 'Centra No2', sans-serif;
}

.post-meta a {
    color: var(--wp--preset--color--dark-gray);
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--wp--preset--color--off-black);
    text-decoration: underline;
}

/* Taxonomy tag styling - all use the same style as state-district */
.post-tag,
.state-district-tag,
.election-year-tag,
.election-type-tag,
.office-tag,
.voting-method-tag {
    background-color: var(--wp--preset--color--dark-gray);
    color: var(--wp--preset--color--white);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.post-tag:hover,
.state-district-tag:hover,
.election-year-tag:hover,
.election-type-tag:hover,
.office-tag:hover,
.voting-method-tag:hover {
    background-color: var(--wp--preset--color--off-black);
    color: var(--wp--preset--color--white);
}

/* Author info styling for single posts */
.author-info {
    border-top: 1px solid var(--wp--preset--color--lightest-gray);
    border-bottom: 1px solid var(--wp--preset--color--lightest-gray);
    padding: 1rem 0;
}

.author-avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.author-details {
    font-size: 0.9375rem;
    color: var(--wp--preset--color--dark-gray);
}

/* Author sidebar - Quick Facts */
.author-quick-facts-list {
    list-style: none;
    margin: 0;
    padding-left: 0 !important;
}

.profile-image {
    max-width: 260px;
}

.quick-fact-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 0 !important;
    border-bottom: 1px dashed var(--wp--preset--color--light-gray);
    gap: 0.5rem;
}

.quick-fact-label {
    font-family: var(--wp--preset--font-family--centra-mono), monospace;
    font-weight: 500;
    flex: 0 0 50%;
    font-size: var(--wp--preset--font-size--small);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-fact-district {
    flex: 1 1 auto;
    text-align: right;
    font-size: var(--wp--preset--font-size--small);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-fact-district .district-card-title {
    font-weight: 500;
    text-decoration: none;
}

.quick-fact-district .rating-badge {
    font-size: var(--wp--preset--font-size--x-small);
}

/* Author links sidebar */
.author-links div {
    margin-bottom: 0.5rem;
}

.author-links .button-outline {
    display: inline-block;
}

/* Author buttons for bylines */
.author-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.author-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--wp--preset--color--lightest-gray);
    padding: 0.5rem 1rem 0.5rem .75rem;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    line-height: 1;
}

.author-button:hover {
    opacity: 0.8;
}

.author-button-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: contain;
}

.author-name {
    color: var(--wp--preset--color--off-black);
    font-weight: 600;
    text-decoration: none;
}

.author-name:hover {
    color: var(--wp--preset--color--dark-blue);
    text-decoration: underline;
}

/* Prevent grid items from stretching to match row height */
.grid-align-items-start {
    align-items: start;
}

/* Ensure post cards don't stretch */
.h-fit-content {
    height: fit-content !important;
}

/* ============================================================================
   BLOCK-SPECIFIC STYLES
   ============================================================================
   The following sections contain styles specific to individual blocks.
   These are one-off styles that don't fit in utility.css
   ============================================================================ */


/* ============================================================================
   CANDIDATES BLOCK
   ============================================================================ */

.candidate-image-wrapper img {
    border-radius: 10px;
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.candidates-list .candidate-item.non-nominee {
    display: none;
}

.candidate-image-wrapper .candidate-image-overlay {
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.candidate-image-wrapper {
    border-radius: 10px;
}

.candidate-image-wrapper--small img {
    width: 80px;
    height: 80px;
}

.incumbent-image-wrapper img {
    border-radius: 10px;
    width: 100px;
    height: 100px;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.incumbent-image-wrapper .candidate-image-overlay {
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.incumbent-image-wrapper {
    border-radius: 10px;
}


.candidate-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: .75rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--wp--preset--color--light-gray);
    position: relative;
    cursor: pointer;
    border-radius: 4px;
}

.candidate-item:first-child {
    border-top: none;
    padding-top: 0;
}

.candidate-item.no-result {
    opacity: 0.4;
}

.candidate-link {
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.candidate-item:hover .candidate-image-wrapper img,
.candidate-item:hover .incumbent-image-wrapper img {
    filter: grayscale(0%);
}

.candidate-item:hover .candidate-image-overlay {
    opacity: 0;
}

.candidate-name-link {
    display: block;
    text-decoration: none;
    color: inherit;
}


.candidate-name-link::after {
    content: '';
    position: absolute;
    inset: 0;
}

.candidate-name-link:hover {
    opacity: 1;
}

.candidate-info {
    flex: 1;
}

.candidate-name-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.candidate-result {
    font-size: var(--wp--preset--font-size--medium);
    font-family: var(--wp--preset--font-family--centra-mono);
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.candidate-winner-check {
    color: var(--wp--preset--color--green);
    font-family: 'Centra No2', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.candidate-votes {
    color: var(--wp--preset--color--dark-gray);
}

.candidate-votes-pct {
    color: var(--wp--preset--color--gray);
    font-weight: 400;
}

.candidate-results-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--wp--preset--color--light-orange, #f59e0b);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
}

.next-election {
    margin-bottom: 1.5rem;
}

.next-election a {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.next-election a:hover {
    text-decoration-style: solid;
}

.past-elections {
    margin-bottom: 1.5rem;
    margin-left: 0;
}

.past-election-row {
    font-weight: 500;
}

.past-election-row a {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.past-election-row a:hover {
    text-decoration-style: solid;
}

.external-link {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.external-link:hover {
    text-decoration-style: solid;
}

.committee-assignments {
    margin-bottom: 1.5rem;
}

.committee-list {
    list-style: none;
    padding-left: 0;
    margin: .25rem 0 0 0;
}

.committee-list > li {
    margin-bottom: 0.5rem;
}

.committee-list ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: .5rem 0 0 0
}

.committee-list ul li {
    margin-bottom: 0.25rem;
}

.committee-list li a {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.committee-list li a:hover {
    text-decoration-style: solid;
}

.committee-list ul ul {
    list-style: circle;
    padding-left: 1.25rem;
    margin: 0.25rem 0 0 0;
}

/* ============================================================================
   STATE INCUMBENTS BLOCK
   ============================================================================ */

.state-incumbents-table {
    width: 100%;
    border-collapse: collapse;
}

.state-incumbents-table .table-header {
    display: grid;
    grid-template-columns: 150px 1fr 250px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--wp--preset--color--light-gray);
    font-family: var(--wp--preset--font-family--centra-mono);
}

.state-incumbents-table .table-row {
    display: grid;
    grid-template-columns: 150px 1fr 250px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--wp--preset--color--lightest-gray);
    align-items: start;
}

.state-incumbents-table .table-row-multi {
    align-items: flex-start;
}

.state-incumbents-table .table-row-link {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.state-incumbents-table .table-row-link:hover {
    background-color: var(--wp--preset--color--lightest-gray);
}

.state-incumbents-table .col-office {
    font-weight: 500;
    font-family: var(--wp--preset--font-family--centra-mono);
}

.state-incumbents-table .col-incumbent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding-right: 2rem;
    font-weight: normal;
}

.state-incumbents-table .col-rating {
    display: flex;
    justify-content: flex-start;
    font-weight: normal;
}

@media (max-width: 640px) {
    .state-incumbents-table .table-header {
        display: none;
    }

    .state-incumbents-table .table-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .state-incumbents-table .col-incumbent {
        padding-right: 0;
    }

    .state-incumbents-table .col-office,
    .state-incumbents-table .col-incumbent {
        margin-bottom: 0.25rem;
    }
}


/* ============================================================================
   OFFICE RACES TABLE (taxonomy-office.php)
   ============================================================================ */

.office-races-table {
    width: 100%;
}

.office-races-table .table-header {
    display: grid;
    grid-template-columns: 180px 1fr 250px;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--wp--preset--color--lightest-gray);
    border-bottom: 2px solid var(--wp--preset--color--light-gray);
    font-weight: bold;
}

.office-races-table .table-row {
    display: grid;
    grid-template-columns: 180px 1fr 250px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wp--preset--color--lightest-gray);
    align-items: center;
}

.office-races-table > a:last-child .table-row {
    border-bottom: none;
}

.office-races-table .table-row-link {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.office-races-table .table-row-link:hover {
    background-color: var(--wp--preset--color--lightest-gray);
}

.office-races-table .col-district {
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--wp--preset--font-size--small);
}

.office-races-table .col-incumbent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.office-races-table .col-rating {
    display: flex;
    justify-content: flex-start;
}

.office-races-table .state-header-row {
    padding: 0.75rem 1rem 0.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 2px solid var(--wp--preset--color--light-gray);
}

.office-races-table .state-header-row:first-child {
    border-top: none;
    margin-top: 0;
}

@media (max-width: 768px) {
    .office-races-table .table-header {
        display: none;
    }

    .office-races-table .table-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .office-races-table .col-district {
        font-size: var(--wp--preset--font-size--x-small);
    }
}

/* Office Races — Multi-column layout (taxonomy-office.php) */
.office-races-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.office-races-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-right: 30px;
    min-width: 0;
}

.office-races-col:last-child {
    margin-right: 0;
}

.office-races-state-group {
    margin-bottom: 0.5rem;
    min-width: 0;
}

.office-type-house .office-races-state-group {
    min-height: 80px;
}

.office-type-senate .office-races-state-group {
    min-height: 200px;
}

.office-type-governor .office-races-state-group {
    min-height: 80px;
}

.office-races-state-heading {
    font-weight: 700;
    font-size: var(--wp--preset--font-size--large);
    margin-bottom: 0rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #000;
}

.office-races-state-heading a {
    text-decoration: none;
    color: inherit;
}

.office-races-state-heading a:hover {
    opacity: 0.6;
}

.office-races-columns ul,
.office-races-mobile ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    margin-bottom: var(--two-spacer);
}

.office-races-columns li,
.office-races-mobile li {
    border-bottom: 1px dashed var(--wp--preset--color--gray);
    padding-bottom: var(--one-spacer) !important;
    font-size: var(--wp--preset--font-size--small);
}

.office-races-columns li:last-child,
.office-races-mobile li:last-child {
    border-bottom: none;
}

.office-races-columns li a.office-race-item,
.office-races-mobile li a.office-race-item {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.office-races-columns li,
.office-races-mobile li {
    position: relative;
}

.office-races-columns li a.office-race-item:hover {
    opacity: 1;
}

/* Hide rating badge by default, show on hover */
.office-races-columns .office-race-rating {
    display: none;
    font-size: var(--wp--preset--font-size--x-small);
    padding: 2px 6px;
}

/* Hover: expand the row above all content */
.office-races-columns li:hover,
.office-races-mobile li:hover {
    position: relative;
    z-index: 10;
    background: var(--wp--preset--color--white);
}

.office-races-columns li:hover a.office-race-item,
.office-races-mobile li:hover a.office-race-item {
    background: var(--wp--preset--color--white);
    overflow: visible;
    border-radius: 3px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.office-races-columns li:hover .office-races-incumbent,
.office-races-mobile li:hover .office-races-incumbent {
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: auto;
}

.office-races-columns li:hover .incumbent-wrapper,
.office-races-columns li:hover .office-races-incumbent-row,
.office-races-mobile li:hover .incumbent-wrapper,
.office-races-mobile li:hover .office-races-incumbent-row {
    overflow: visible;
    white-space: nowrap;
    background: var(--wp--preset--color--white);
}

.office-races-columns li:hover .office-race-rating,
.office-races-mobile li:hover .office-race-rating {
    display: inline-block;
    margin-left: 8px;
}

/* Per-person party color — desktop (hover-scoped) and mobile (always visible) */
.office-races-columns li .office-races-incumbent-row:has(.party-d) .office-races-incumbent,
.office-races-mobile li .office-races-incumbent-row:has(.party-d) .office-races-incumbent {
    color: var(--wp--preset--color--democrat-blue);
}

.office-races-columns li .office-races-incumbent-row:has(.party-r) .office-races-incumbent,
.office-races-mobile li .office-races-incumbent-row:has(.party-r) .office-races-incumbent {
    color: var(--wp--preset--color--republican-red);
}

.office-races-columns li .office-races-incumbent-row:has(.party-i) .office-races-incumbent,
.office-races-columns li .office-races-incumbent-row:has(.party-other) .office-races-incumbent,
.office-races-mobile li .office-races-incumbent-row:has(.party-i) .office-races-incumbent,
.office-races-mobile li .office-races-incumbent-row:has(.party-other) .office-races-incumbent {
    color: #8a7500;
}

.office-races-incumbent {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.office-races-incumbent.is-vacant {
    color: var(--wp--preset--color--gray);
    font-weight: 400;
}

/* Incumbent wrapper — takes remaining space after district label, stacks persons vertically */
.incumbent-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.office-races-incumbent-row {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    margin-bottom: .25rem;
}

.office-races-incumbent-row:last-child {
    margin-bottom: 0;
}

.office-races-incumbent-row .office-races-incumbent {
    flex: 1;
    min-width: 0;
    margin-left: .5rem;
    font-weight: 500;
}

/* office-agg-races-incumbent — same layout as office-races-incumbent, normal font-weight */
.office-races-columns li:hover .office-agg-races-incumbent,
.office-races-mobile li:hover .office-agg-races-incumbent {
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: auto;
}

.office-races-columns li:hover .office-agg-races-incumbent-row,
.office-races-mobile li:hover .office-agg-races-incumbent-row {
    overflow: visible;
    white-space: nowrap;
    background: var(--wp--preset--color--white);
}

.office-races-columns li .office-agg-races-incumbent-row:has(.party-d) .office-agg-races-incumbent,
.office-races-mobile li .office-agg-races-incumbent-row:has(.party-d) .office-agg-races-incumbent {
    color: var(--wp--preset--color--democrat-blue);
}

.office-races-columns li .office-agg-races-incumbent-row:has(.party-r) .office-agg-races-incumbent,
.office-races-mobile li .office-agg-races-incumbent-row:has(.party-r) .office-agg-races-incumbent {
    color: var(--wp--preset--color--republican-red);
}

.office-races-columns li .office-agg-races-incumbent-row:has(.party-i) .office-agg-races-incumbent,
.office-races-columns li .office-agg-races-incumbent-row:has(.party-other) .office-agg-races-incumbent,
.office-races-mobile li .office-agg-races-incumbent-row:has(.party-i) .office-agg-races-incumbent,
.office-races-mobile li .office-agg-races-incumbent-row:has(.party-other) .office-agg-races-incumbent {
    color: #8a7500;
}

.office-agg-races-incumbent {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.office-agg-races-incumbent.is-vacant {
    color: var(--wp--preset--color--gray);
    font-weight: 400;
}

.office-agg-races-incumbent-row {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    margin-bottom: .25rem;
}

.office-agg-races-incumbent-row:last-child {
    margin-bottom: 0;
}

.office-agg-races-incumbent-row .office-agg-races-incumbent {
    flex: 1;
    min-width: 0;
    margin-left: .5rem;
    font-weight: 400;
}

.office-races-mobile .office-agg-races-incumbent {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.office-races-mobile .office-agg-races-incumbent-row {
    overflow: hidden;
    min-width: 0;
}

.office-races-footnote {
    font-size: var(--wp--preset--font-size--x-small);
    color: var(--wp--preset--color--dark-gray);
    font-style: italic;
    display: block;
    margin-top: 5px;
}

.office-races-class {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--gray);
}

.office-races-columns .rating-badge,
.office-races-mobile .rating-badge {
    font-size: var(--wp--preset--font-size--x-small);
    white-space: nowrap;
}

.office-races-columns .district,
.office-races-mobile .district {
    color: var(--wp--preset--color--dark-gray);
    margin-top: 2px;
}

.office-races-columns .office-race-item:has(.ratings-incumbent-vacant) .district,
.office-races-mobile .office-race-item:has(.ratings-incumbent-vacant) .district {
    margin-top: 0;
}

.office-races-columns .ratings-open-indicator,
.office-races-columns .ratings-special-indicator,
.office-races-mobile .ratings-open-indicator,
.office-races-mobile .ratings-special-indicator {
    font-size: calc(var(--wp--preset--font-size--small) - 1px);
}

.office-races-columns .ratings-party-badge,
.office-races-columns .district,
.office-races-columns .office-races-class,
.office-races-columns .ratings-open-indicator,
.office-races-columns .ratings-special-indicator,
.office-races-columns .ratings-incumbent-vacant,
.office-races-mobile .ratings-party-badge,
.office-races-mobile .district,
.office-races-mobile .office-races-class,
.office-races-mobile .ratings-open-indicator,
.office-races-mobile .ratings-special-indicator,
.office-races-mobile .ratings-incumbent-vacant {
    flex-shrink: 0;
    white-space: nowrap;
}

.office-races-columns .ratings-open-indicator,
.office-races-mobile .ratings-open-indicator {
    margin: 0 .5rem;
}

.office-races-columns .ratings-special-indicator,
.office-races-mobile .ratings-special-indicator {
    margin-right: .5rem;
}

/* Senate/Governor: hide PHP-distributed column layout, use CSS grid via mobile structure instead */
.office-races-columns.office-type-senate,
.office-races-columns.office-type-governor {
    display: none;
}

/* Senate/Governor: always-on responsive CSS grid */
.office-races-mobile.office-type-senate,
.office-races-mobile.office-type-governor {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0 1.5rem;
}

.office-races-mobile.office-type-senate .office-races-state-group,
.office-races-mobile.office-type-governor .office-races-state-group {
    min-height: 0;
    margin-bottom: var(--two-spacer);
}

.office-races-mobile.office-type-senate .office-races-state-group .office-races-letter-heading,
.office-races-mobile.office-type-governor .office-races-state-group .office-races-letter-heading {
    display: none;
}

/* Letter headings — shared by desktop columns and mobile grid */
.office-races-letter-heading {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin: 1rem 0 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: none;
}

.office-races-col .office-races-letter-heading:first-child {
    margin-top: 0;
}

/* Mobile grid — hidden on desktop */
.office-races-mobile {
    display: none;
}

/* Mobile: ratings always visible, incumbent names wrap instead of ellipsing */
.office-races-mobile .office-race-rating {
    display: inline-block;
    margin-left: 8px;
    font-size: var(--wp--preset--font-size--x-small);
    padding: 2px 6px;
}

/* On hover-capable (non-touch) devices, hide rating badge until hover */
@media (hover: hover) {
    .office-races-mobile .office-race-rating {
        display: none;
    }

    .office-races-mobile li:hover .office-race-rating {
        display: inline-block;
    }
}

.office-races-mobile .office-races-incumbent {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.office-races-mobile .incumbent-wrapper,
.office-races-mobile .office-races-incumbent-row {
    overflow: hidden;
    min-width: 0;
}

/* At ≤1200px: hide desktop columns, show mobile left-to-right grid */
@media (max-width: 1200px) {
    .office-races-columns {
        display: none;
    }

    .office-races-mobile {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0 1.5rem;
    }

    .office-races-mobile.office-type-senate,
    .office-races-mobile.office-type-governor {
        grid-template-columns: repeat(4, 1fr);
    }

    /* All cells get padding-top so state headings align across each row */
    .office-races-mobile .office-races-state-group {
        position: relative;
        min-height: 0;
        margin-bottom: var(--five-spacer);
    }

    /* Letter heading absolutely positioned into that padding space */
    .office-races-mobile .office-races-state-group .office-races-letter-heading {
        position: absolute;
        top: 0;
        left: 0;
        margin: 0;
        border-bottom: none;
        line-height: 1;
    }
}

@media (max-width: 1024px) {
    .office-races-mobile {
        grid-template-columns: repeat(2, 1fr);
    }

    .office-races-mobile.office-type-senate,
    .office-races-mobile.office-type-governor {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .office-races-mobile {
        grid-template-columns: 1fr;
    }

    .office-races-mobile.office-type-senate,
    .office-races-mobile.office-type-governor {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .office-races-mobile.office-type-senate,
    .office-races-mobile.office-type-governor {
        grid-template-columns: 1fr;
    }
}


/* ============================================================================
   TAXONOMY TEMPLATE COMPONENTS
   ============================================================================ */

.tax-election-year header:not(.mobile-menu-open) .header-top {
	border-bottom: 10px solid var(--wp--preset--color--white);
}


/* Hero Section */
.hero-section {
    color: var(--wp--preset--color--white);
	max-width: none !important;
	width: 100vw!important;
}

.hero-bg-democrat {
    background-color: var(--wp--preset--color--democrat-blue);
}

.hero-bg-republican {
    background-color: var(--wp--preset--color--republican-red);
}

.hero-bg-independent {
    background-color: #8a7500;
}

/* Breadcrumb */
.breadcrumb-link {
    color: var(--wp--preset--color--white);
    text-decoration: none;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.breadcrumb-select {
    background: rgba(255,255,255,0.2);
    color: var(--wp--preset--color--white);
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    cursor: pointer;
    font-size: var(--wp--preset--font-size--medium);
}

.breadcrumb-select:hover {
    background-color: rgba(255,255,255,0.4) !important;
}

.breadcrumb-select:focus {
    outline: transparent;
}

.breadcrumb-select option {
    color: var(--wp--preset--color--dark-gray);
}

.rn-cycle-select {
    font-family: var(--wp--preset--font-family--centra-mono), monospace;
    font-size: var(--wp--preset--font-size--medium);
    border: 2px solid var(--wp--preset--color--lightest-gray);
    border-radius: 4px;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--black);
    cursor: pointer;
}
.rn-cycle-select:hover,
.rn-cycle-select:focus {
    border-color: var(--wp--preset--color--light-gray);
    outline: transparent;
}

/* District Title */
.district-title {
    font-size: 3.2rem;
}

@media (min-width: 768px) {
    .district-title {
        font-size: 4rem;
    }
}


.district-description {
    max-width: 500px;
    font-weight: 500;
    font-size: 1.35rem;
}

/* Info Card */
.info-card {
    background: var(--wp--preset--color--white);
    border-radius: 8px;
    padding: 2rem;
    color: var(--wp--preset--color--dark-gray);
}

.info-card-content {
    gap: 2rem;
}

@media screen and (max-width: 1199px) {
    .district-description {
        margin-top: var(--two-spacer);
        margin-bottom: var(--three-spacer);
    }
}

@media screen and (max-width: 767px) {
    .info-card-content {
        flex-direction: column;
    }
}

/* Map Section */
.map-section {
    flex: 1;
    min-width: 250px;
}

.map-section-title {
    margin: 0 0 1rem 0;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 400;
    font-family: var(--wp--preset--font-family--centra-mono);
    color: var(--wp--preset--color--off-black);
}

.map-container {
    width: 100%;
    height: 320px;
    border-radius: 5px;
    border: 1px solid var(--wp--preset--color--light-gray);
    overflow: hidden;
}

.map-unavailable {
    color: var(--wp--preset--color--dark-gray);
    text-align: center;
}

/* Static Map (hero section) */
.static-map-container {
    position: relative;
    width: 100%;
    border-radius: 5px;
    border: 1px solid var(--wp--preset--color--light-gray);
    overflow: hidden;
    line-height: 0;
    margin-bottom: var(--one-spacer);
}

.static-map-bg {
    width: 100%;
    height: auto;
    display: block;
}

.static-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-legend-current::before,
.map-legend-previous::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 50%;
    margin-right: 4px;
}

.map-legend-current::before {
    background: color-mix(in srgb, var(--legend-bg) calc(var(--legend-opacity, 1) * 100%), transparent);
    border: 2px solid var(--legend-border);
}

.map-legend-previous::before {
    background: var(--legend-prev-bg, rgba(102, 102, 102, 0.25));
    border: 2px dashed var(--legend-prev-border, #666);
}

/* Rating Section */
.rating-section {
    flex: 0 0 290px;
    min-width: 200px;
}

@media screen and (max-width: 636px) {
    .rating-section {
        flex: 0 0 100%;
        width: 100%;
    }
}

.rating-section-header {
    margin-bottom: 1rem;
}

.rating-section-title {
    margin: 0;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 400;
    font-family: var(--wp--preset--font-family--centra-mono);
    color: var(--wp--preset--color--off-black);
}

.rating-see-all {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--democrat-blue);
    text-decoration: none;
}

/* Rating Circle */
.rating-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    white-space: wrap;
    font-weight: 500;
    font-size: 1.3rem;
    margin: 0 auto 1.5rem;
    text-decoration: none;
}

.rating-circle.rating-badge {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 500;
}

.edit-link {
    display: block;
    text-align: center;
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--dark-gray);
    font-family: var(--wp--preset--font-family--centra-mono);
    text-decoration: none;
    margin-top: -1rem;
    margin-bottom: 1rem;
}

.edit-link:hover {
    color: var(--wp--preset--color--black);
}

/* Baseline Info */
.baseline-container {
    text-align: left;
}

.baseline-header {
    margin-bottom: 1rem;
}

.baseline-label {
    margin: 0;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 400;
    font-family: var(--wp--preset--font-family--centra-mono);
    color: var(--wp--preset--color--off-black);
}

.baseline-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.baseline-value.baseline-democrat {
    color: var(--wp--preset--color--democrat-blue);
}

.baseline-value.baseline-republican {
    color: var(--wp--preset--color--republican-red);
}

.baseline-breakdown {
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    color: var(--wp--preset--color--dark-gray);
}

/* Category List */
.category-list {
	display: inline;
}
.category-list a {
	margin-right: 1rem;
	padding: 2px 5px;
	font-weight: 500;
	text-transform: uppercase;
	background-color: var(--wp--preset--color--light-gray);
	border-radius: 5px;
	color: black;
	line-height: 200%;
}

/* Buttons */
button {
	cursor: pointer;
}

.wp-block-button a {
	border: 2px solid var(--wp--preset--color--black);
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--black);
	border-radius: 5px;
	font-family: var(--wp--preset--font-family--centra-mono), monospace;
	padding: 6px 12px;
	transition: all 0.2s;
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
    font-weight: normal;
	text-decoration: none;
	transition: all 0.2s;
	text-align: center;
}

.wp-block-button a:hover {
    color: var(--wp--preset--color--black);
    background-color: var(--wp--preset--color--white);
    border: 2px solid var(--wp--preset--color--black);
}

.button-fill {
	border: 2px solid var(--wp--preset--color--black);
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--black);
	border-radius: 5px;
	font-family: var(--wp--preset--font-family--centra-mono), monospace;
	padding: 6px 12px;
	transition: all 0.2s;
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
    font-weight: normal;
	text-decoration: none;
	transition: all 0.2s;
	text-align: center;
}

.button-fill:hover {
    color: var(--wp--preset--color--black);
    background-color: var(--wp--preset--color--white);
    border: 2px solid var(--wp--preset--color--black);
}

.button-outline,
.wp-block-button.is-style-outline a,
.mepr-login-form-wrap .mepr-login-link a {
    border: 2px solid var(--wp--preset--color--light-gray);
    color: inherit;
    background-color: transparent;
	border-radius: 5px;
	font-family: var(--wp--preset--font-family--centra-mono), monospace;
	padding: 6px 12px;
	transition: all 0.2s;
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
    font-weight: normal;
	text-decoration: none;
	transition: all 0.2s;
	text-align: center;
}

.button-outline:hover,
.wp-block-button.is-style-outline a:hover,
.mepr-login-form-wrap .mepr-login-link a:hover {
    background-color: var(--wp--preset--color--light-gray);
    border-color: var(--wp--preset--color--light-gray);
    color: var(--wp--preset--color--black);
}

.button-fill {
    border: 2px solid var(--wp--preset--color--black);
    color: var(--wp--preset--color--white) !important;
    background-color: var(--wp--preset--color--black);
    border-radius: 5px;
    font-family: var(--wp--preset--font-family--centra-mono), monospace;
    padding: 6px 12px;
    display: inline-block;
    font-size: var(--wp--preset--font-size--small);
    font-weight: normal;
    text-decoration: none !important;
    transition: all 0.2s;
    text-align: center;
}

.button-fill:hover {
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--black) !important;
}

/* Section Headers */
.section-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: var(--two-spacer);
    padding-top: var(--one-spacer);
}

/* Single Post */
.single-post .author-details, .single-post .post-content {
	margin-top: 2rem;
	max-width: none;
}

.post-left-col > * {
	position: relative;
	top: -2px;
}

/* Feature Card */
.feature-title {
	font-size: 1.125;
	font-family: var(--wp--preset--font-family--centra-mono), monospace;
	font-weight: 600;
	text-transform: uppercase;
}

/* Person Card */
.person-card-image-wrapper {
	width: 100px;
	height: 100px;
	border-radius: 10px;
	overflow: hidden;
	flex-shrink: 0;
}

.person-card-image {
	width: 100px;
	height: 100px;
	object-fit: cover;
	display: block;
	filter: grayscale(100%);
	border-radius: 10px;
	transition: filter 0.3s ease;
}

.person-card-image-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	mix-blend-mode: screen;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.person-card-link {
	color: inherit;
	text-decoration: none;
	font-weight: inherit;
	transition: all 0.3s ease;
}

.person-card-link:hover .person-card-image {
	filter: grayscale(0%);
}

.person-card-link:hover .person-card-image-overlay {
	opacity: 0;
}

.person-card .h5 {
	word-wrap: break-word;
}

.edit-quick-link {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 10;
	border: 2px solid var(--wp--preset--color--light-gray);
	color: inherit;
	background-color: transparent;
	border-radius: 5px;
	font-family: var(--wp--preset--font-family--centra-mono), monospace;
	padding: 6px 12px;
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: normal;
	text-decoration: none;
	text-align: center;
	opacity: 0;
	transition: all 0.2s;
}

.candidate-item:hover .edit-quick-link,
article:hover .edit-quick-link {
	opacity: 1;
}

.edit-quick-link:hover {
	background-color: var(--wp--preset--color--light-gray);
	border-color: var(--wp--preset--color--light-gray);
	color: var(--wp--preset--color--black);
}

.person-card .party-badge {
	margin-right: 7px;
}

.person-card .open-text {
	color: var(--color-green);
}

.person-card .open-text::before {
	content: '';
	display: inline-block;
	background-color: var(--color-green);
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

/* Party Badge */
.party-badge {
	border-radius: 5px;
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--medium);
	padding: 4px 5px;
}

.party-badge--small {
	font-size: var(--wp--preset--font-size--small);
	padding: 3px;
}

.party-badge--large {
	font-size: 1.2rem;
	height: 30px;
    width: 30px;
	font-weight: 500;
}

.party-badge--republican {
	background-color: var(--wp--preset--color--republican-red);
}

.party-badge--democrat {
	background-color: var(--wp--preset--color--democrat-blue);
}

.party-badge--independent {
	background-color: #8a7500;
}

.party-badge--green {
	background-color: var(--wp--preset--color--green);
}

.party-badge--third-party {
	background-color: #8a7500;
}

/** Collapsible Sections **/

/** 

.collapsible-container should be parent of .collapsible section,
with a .collapse-button that toggles the .collapsible-content-hidden class on .collapsible-container.
see blocks/subscribe/block.php for example.

**/

.collapsible-section {
	overflow: hidden;
	height: auto;
	transition: all 0.3s;
}

.collapsible-container.collapsible-content-hidden .collapsible-section {
	height: 0;
	max-height: 0;
	visibility: hidden;
}

.collapse-button {
	display: flex;
	align-items: center;
	cursor: pointer;
}


/** Optionally show / hide different labels in collapse-button. **/
.collapsible-container.collapsible-content-hidden .content-hidden-label {
	display: inline-block;
	visibility: visible;
}

.collapsible-container.collapsible-content-hidden .content-shown-label {
	display: none;
	visibility: hidden;
}

.collapsible-container:not(.collapsible-content-hidden) .content-shown-label {
	display: inline-block;
	visibility: visible;
}

.collapsible-container:not(.collapsible-content-hidden) .content-hidden-label {
	display: none;
	visibility: hidden;
}

.collapse-icon{
	display: inline-block;
	width: 10px;
	height: 5px;
	margin-left: 10px;
	background-image: url('../assets/icons/collapse-chevron.svg');
	background-size: 100%;

}

.collapsible-container:not(.collapsible-content-hidden) .collapse-icon {
	transform: rotate(180deg);
}


/* Data Bars */
.data-bar-segment {
	position: relative;
}

.data-bar-number-display {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
	color: white;
	font-size: var(--wp--preset--font-size--medium);
}
.data-bar-number-display.independent {
	color: black;
}

.data-bar-solid-larger {
	border-radius: 2px 0 0 2px;
}
.data-bar-solid-independent {
	border-radius: 0 2px 2px 0;
}

/* Party Key Label */
.data-bar .party-key-label {
	flex-basis: 33%;
}

.square-party-key {
	width: 21px;
	height: 22px;
	text-align: center;
	display: inline-block;
	color: white;
	position: relative;
}
.square-party-key span {
	position: relative;
	top: -2px;
}

/* ============================================================================
   RATINGS BAR BLOCKS (shared across senate, house, governor, president)
   ============================================================================ */

.ratings-block-container {
    margin: var(--three-spacer) auto;
}

.ratings-spectrum-container {
    position: relative;
}

.block-ratings-bar {
    display: flex;
    height: 50px;
}

.ratings-threshold {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    font-size: 1.1em;
}

.ratings-threshold-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 50px;
    background: #000;
    transform: translateX(-50%);
}

.ratings-toggle-container {
    margin-bottom: 10px;
}

.ratings-toggle-button {
    padding: 6px 12px;
    border: 1px solid #333;
    background-color: #eee;
    cursor: pointer;
    font-weight: bold;
}

.ratings-toggle-button.active {
    background-color: #333;
    color: #fff;
}

/* Bar segments */
.ratings-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ratings-bar-segment--solid-d {
    justify-content: flex-start;
    padding-left: 15px;
    gap: 15px;
}

.ratings-bar-segment--solid-r {
    justify-content: flex-end;
    padding-right: 15px;
    gap: 15px;
}

.ratings-bar-segment--notup-d {
    justify-content: flex-start;
    padding-left: 15px;
    gap: 15px;
}

.ratings-bar-segment--notup-r {
    justify-content: flex-end;
    padding-right: 15px;
    gap: 15px;
}

.ratings-bar-count {
    color: #fff;
    font-size: var(--wp--preset--font-size--large);
    font-weight: bold;
}

.ratings-bar-count--notup-num {
    color: #333;
}

/* View All Solid / Not Up buttons (inside bar) */
.ratings-solid-bar-button {
    padding: 4px 10px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--centra-mono) !important;
    font-size: var(--wp--preset--font-size--small);
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.2;
}

.ratings-solid-bar-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--wp--preset--color--white);
}

.ratings-solid-bar-button.active {
    background: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--black);
}

/* Not Up buttons sit on gray background, need darker borders/text */
.ratings-solid-bar-button--notup-dem,
.ratings-solid-bar-button--notup-rep {
    color: #333;
    border-color: rgba(0, 0, 0, 0.3);
}

.ratings-solid-bar-button--notup-dem:hover,
.ratings-solid-bar-button--notup-rep:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #333;
}

.ratings-solid-bar-button--notup-dem.active,
.ratings-solid-bar-button--notup-rep.active {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* Middle columns */
.ratings-middle-columns {
    display: flex;
    flex-wrap: wrap;
}

.ratings-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-right: 15px;
}

.ratings-column:last-child {
    margin-right: 0;
}

/* 9-column grid for "Not Up This Cycle" view */
.ratings-middle-columns--notup-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1rem;
}

.ratings-middle-columns--notup-grid .ratings-column--notup {
    margin-right: 0;
}

.ratings-state-heading {
    font-size: var(--wp--preset--font-size--medium);
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

.ratings-state-heading:first-child {
    margin-top: 0;
}

.ratings-state-abbr {
    font-weight: 700;
    font-family: var(--wp--preset--font-family--centra-mono), monospace;
}

@media screen and (max-width: 1200px) {
    .ratings-middle-columns--notup-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .ratings-middle-columns--notup-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .ratings-middle-columns--notup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Column heading (label badge + count badge) */
.ratings-column-heading {
    display: flex;
    justify-content: start;
    margin-bottom: 12px;
    gap: 0;
}

.ratings-label-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 500;
    font-size: var(--wp--preset--font-size--small);
    white-space: nowrap;
}

.ratings-count-badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: 500;
    font-size: var(--wp--preset--font-size--small);
    margin-left: -2px;
}

/* List items */
.ratings-middle-columns ul,
.ratings-solid-columns ul {
    list-style: none;
    padding-left: 0;
}

.ratings-middle-columns li,
.ratings-solid-columns li {
    border-top: 1px dashed var(--wp--preset--color--gray);
    margin-top: var(--one-spacer);
    margin-bottom: 0;
    padding-top: var(--one-spacer);
}

.ratings-middle-columns li strong,
.ratings-solid-columns li strong {
    font-family: var(--wp--preset--font-family--centra-mono) !important;
    font-size: var(--wp--preset--font-size--medium) !important;
}

.ratings-middle-columns li a,
.ratings-solid-columns li a {
    text-decoration: none !important;
}

.ratings-middle-columns .electoral-votes {
    color: var(--wp--preset--color--gray);
    font-weight: 400;
    font-family: var(--wp--preset--font-family--centra-no2), sans-serif;
    font-size: var(--wp--preset--font-size--small);
}

/* Inline indicators */
.ratings-shift-left {
    color: var(--wp--preset--color--democrat-blue);
    font-weight: 700;
}

.ratings-shift-right {
    color: var(--wp--preset--color--republican-red);
    font-weight: 700;
}

.ratings-party-badge {
    color: var(--wp--preset--color--white);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 2px;
}

.ratings-party-badge.party-d {
    background-color: var(--wp--preset--color--democrat-blue);
}

.ratings-party-badge.party-r {
    background-color: var(--wp--preset--color--republican-red);
}

.ratings-party-badge.party-i,
.ratings-party-badge.party-other {
    background-color: #8a7500;
}

.section-header h2 span.mono {
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--dark-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: normal;
}

.block-search-district-card {
    border: 2px solid var(--wp--preset--color--lightest-gray);
    border-radius: 10px;
    padding: var(--two-spacer);
    position: relative;
}

.block-search-district-card:hover {
    border: 2px solid var(--wp--preset--color--gray);
    background-color: var(--wp--preset--color--lightest-gray);
}

.block-search-district-card .search-district-card {
    width: 100%;
}

.block-search-district-card .search-district-card-header {
    margin-bottom: 12px;
}

.block-search-district-card .search-district-card-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.block-search-district-card .search-district-card-description {
    font-size: var(--wp--preset--font-size--small);
    line-height: 1.6;
    margin-bottom: 0;
}

.block-search-district-card .search-district-card-description p:last-child {
    margin-bottom: 0;
}

.block-search-district-card .search-district-card-rating {
    position: absolute;
    top: var(--two-spacer);
    right: var(--two-spacer);
}

.ratings-incumbent-vacant {
    color: var(--wp--preset--color--dark-gray);
    font-size: 14px;
}

/* Seats in Play bracket (house block) */
.seats-in-play {
    margin-top: 10px;
}

.seats-in-play-bracket {
    display: flex;
    align-items: stretch;
    margin-bottom: 40px;
}

.seats-bracket-left {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--wp--preset--color--gray);
    position: relative;
}

.seats-bracket-left::after {
    display: block;
    content: " ";
    height: 20px;
    width: 1px;
    background-color: var(--wp--preset--color--gray);
    position: absolute;
    left: 0px;
    top: 20px;
}

.seats-bracket-right {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--wp--preset--color--gray);
    position: relative;
}

.seats-bracket-right::after {
    display: block;
    content: " ";
    height: 20px;
    width: 1px;
    background-color: var(--wp--preset--color--gray);
    position: absolute;
    right: 0px;
    top: 20px;
}

.seats-bracket-count {
    font-family: var(--wp--preset--font-family--centra-no2), sans-serif;
    font-weight: bold;
    background-color: var(--wp--preset--color--white);
    padding: 0px 10px;
    font-size: var(--wp--preset--font-size--medium);
    white-space: nowrap;
    top: 10px;
    position: absolute;
}

.seats-bracket-center {
    display: flex;
    padding: 0px;
    height: 20px;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    border-bottom: none;
    border-left: 1px solid var(--wp--preset--color--gray);
    border-right: 1px solid var(--wp--preset--color--gray);
    position: relative;
}

.seats-bracket-total {
    font-family: var(--wp--preset--font-family--centra-no2), sans-serif;
    font-weight: bold;
    font-size: var(--wp--preset--font-size--medium);
    top: 10px;
    position: absolute;
    background-color: var(--wp--preset--color--white);
    padding: 0px 10px;
    z-index: 1;
}

/* Solid view: back button, separator, columns */
.ratings-solid-back-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 15px;
}

.ratings-solid-back-button {
    padding: 4px 10px;
    border-radius: 4px;
    border: 2px solid var(--wp--preset--color--gray);
    background: transparent;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--centra-mono), monospace;
    font-size: var(--wp--preset--font-size--small);
}

.ratings-solid-back-button:hover {
    background: var(--wp--preset--color--light-gray, #f5f5f5);
}

.ratings-solid-separator {
    border-top: 1px solid var(--wp--preset--color--gray);
    margin-bottom: 16px;
}

.ratings-solid-columns {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0px;
}

.ratings-open-indicator {
    text-transform: uppercase;
    font-family: var(--wp--preset--font-family--centra-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--wp--preset--color--green);
}

.ratings-special-indicator {
    text-transform: uppercase;
    font-family: var(--wp--preset--font-family--centra-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--wp--preset--color--off-black);
}

@media (max-width: 500px) {
    .ratings-bar-count {
        display: none;
    }
}

/* Mobile carousel navigation for ratings blocks */
.ratings-mobile-nav {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ratings-mobile-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--wp--preset--color--gray);
    border-radius: 5px;
    background: var(--wp--preset--color--white);
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}

.ratings-mobile-nav-btn:hover:not(:disabled) {
    background: var(--wp--preset--color--light-gray, #f5f5f5);
}

.ratings-mobile-nav-btn:disabled {
    cursor: not-allowed;
}

.ratings-mobile-heading {
    display: flex;
    align-items: center;
    gap: 0;
}

@media (max-width: 992px) {
    .ratings-mobile-nav {
        display: flex;
    }

    .ratings-middle-columns.ratings-mobile-mode {
        flex-direction: column;
    }

    .ratings-middle-columns.ratings-mobile-mode .ratings-column {
        margin-right: 0;
        width: 100%;
    }

    .ratings-middle-columns.ratings-mobile-mode .ratings-column-heading {
        display: none;
    }

    /* Solid view single column on mobile */
    .ratings-solid-single-column {
        width: 100%;
        margin-right: 0;
    }

    .ratings-solid-columns {
        display: none;
    }

    .seats-bracket-count {
        display: none;
    }
}

/* Pagination styles */
.pagination {
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-family: var(--wp--preset--font-family--centra-no2), sans-serif;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    text-decoration: none;
    color: var(--wp--preset--color--black);
    background-color: var(--wp--preset--color--white);
    border-radius: 50px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pagination .page-numbers:hover {
    background-color: var(--wp--preset--color--light-gray);
    border-color: var(--wp--preset--color--gray);
}

.pagination .page-numbers.current {
    background-color: var(--wp--preset--color--black);
    border-color: var(--wp--preset--color--black);
    color: var(--wp--preset--color--white);
    border-radius: 50%;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    font-size: var(--wp--preset--font-size--medium);
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: auto;
    padding: 0 0.25rem;
}

/* MemberPress unauthorized message - paywall overlay */
.mepr-price-menu .mepr-price-boxes .mepr-price-box-heading {
    margin: 0 auto 20px auto !important;
    padding: var(--two-spacer);
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 90%;
}

.mepr-price-box-benefits {
    padding-left: 15px;
}


.mepr-unauthorized-message {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    padding: 8rem 1.5rem 6rem 1.5rem;
    background: linear-gradient(
        to bottom,
        rgba(255, 249, 216, 0) 0%,
        rgba(255, 249, 216, .9) 20%,
        rgba(255, 249, 216, 1) 40%,
        rgba(255, 249, 216, 1) 100%
    );
    text-align: center;
}

.mepr-unauthorized-message > * {
    max-width: var(--responsive--aligndefault-width);
    margin-left: auto;
    margin-right: auto;
}

.mepr-unauthorized-message h3 {
    margin-top: var(--one-spacer);
    border-top: 2px solid var(--wp--preset--color--dark-gray);
    padding-top: var(--three-spacer);
    font-weight: 600;
    font-size: 32px;
}

.mepr-unauthorized-message p {
    padding-left: 9rem;
    padding-right: 9rem;
    margin: var(--two-spacer) auto;
}

.mepr-login-form-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--wp--preset--color--light-yellow);
    text-align: center;
    padding: 1.25rem 1.5rem;
    border-top: 2px solid var(--wp--preset--color--dark-gray);
}

.mepr-login-form-wrap {
    max-width: var(--responsive--aligndefault-width);
    margin-left: auto;
    margin-right: auto;
}

/* Premium content placeholder */
.premium-placeholder {
    background-color: var(--wp--preset--color--light-yellow);
    border-radius: 5px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.premium-placeholder__label {
    color: var(--wp--preset--color--black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem;
}

.premium-placeholder__description {
    margin: 0;
    color: var(--wp--preset--color--dark-gray);
}

.mepr-price-menu .mepr-price-boxes .mepr-price-box {
    border-radius: 5px !important;
    border: 2px solid var(--wp--preset--color--black) !important;
}

.mepr-price-menu .mepr-price-boxes .mepr-price-box .mepr-price-box-content {
    background-color: var(--wp--preset--color--light-yellow) !important;
    border: 2px solid var(--wp--preset--color--black) !important;
}

.mepr-price-menu .mepr-price-boxes .mepr-price-box:first-child .mepr-price-box-content {
    border-left: 2px solid var(--wp--preset--color--black);
}

.mepr_error {
    background-color: var(--wp--preset--color--tilt-red) !important;
    border: 2px solid var(--wp--preset--color--republican-red) !important;
}

.mepr_error, .mepr_updated {
    padding: 10px 10px 10px 15px !important;
    margin-bottom: 25px !important;
    box-sizing: border-box !important;
    width: 100%;
    border-radius: 5px;
}

.mp_wrapper label, .mp_wrapper .mp-row {
    font-size: var(--wp--preset--font-size--small);
    font-family: var(--wp--preset--font-family--centra-mono);
    letter-spacing: 1px;
    text-transform: uppercase !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    margin-bottom: var(--one-spacer) !important;
}

.mp_wrapper label input {
    border: 2px solid var(--wp--preset--color--lightest-gray);
    height: 18px;
    width: 18px;
}

.mepr-form input.invalid, .mepr-form select.invalid, .mepr-form textarea.invalid, .mepr-form label.mepr-checkbox-field.invalid, .mepr-form div.mepr-checkboxes-field.invalid, .mepr-form div.mepr-radios-field.invalid {
    border: 2px solid var(--wp--preset--color--republican-red) !important;
    background-color: var(--wp--preset--color--tilt-red) !important;
}

.mp_wrapper .cc-error, .mp_wrapper .mepr-validation-error {
    color: var(--wp--preset--color--republican-red);
    font-family: var(--wp--preset--font-family--centra-mono);
    letter-spacing: 1px;
    font-size: var(--wp--preset--font-size--x-small);
    text-transform: uppercase;
}

.mp_wrapper .mepr-form-has-errors {
    color: var(--wp--preset--color--republican-red);
    padding: .75rem 1rem;
    border-radius: 5px;
    border: 1px solid var(--wp--preset--color--republican-red);
    font-family: var(--wp--preset--font-family--centra-mono);
    font-size: var(--wp--preset--font-size--small);
    text-transform: uppercase;
}

.mp_login_form input[type=submit] {
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--black);
    border-radius: 5px;
    font-family: var(--wp--preset--font-family--centra-mono);
    font-size: var(--wp--preset--font-size--medium);
    border: 1px solid var(--wp--preset--color--black);
}

.mp_login_form input[type=submit]:hover {
    color: var(--wp--preset--color--black);
    background-color: var(--wp--preset--color--light-yellow);
    border: 1px solid var(--wp--preset--color--black);
}

.mepr-price-menu .mepr-price-boxes.mepr-3-col .mepr-price-box-content, .mepr-price-menu .mepr-price-boxes.mepr-2-col .mepr-price-box-content, .mepr-price-menu .mepr-price-boxes.mepr-1-col .mepr-price-box-content {
    border-radius: 10px 10px !important;
}

.mepr-price-menu .mepr-price-boxes .mepr-price-box-button a {
    border: 2px solid var(--wp--preset--color--black) !important;
    background-color: var(--wp--preset--color--white);
    border-radius: 5px !important;
    color: var(--wp--preset--color--black);
    text-decoration: none;
    font-family: var(--wp--preset--font-family--centra-mono);
    font-size: var(--wp--preset--font-family--centra-mono);
    font-weight: normal !important;
    text-transform: capitalize;
    display: block;
    width: 90%;
    margin: 0 auto;
    padding: 0.5rem 0rem;
}

.mepr-price-menu .mepr-price-boxes .mepr-price-box-button a:hover {
    border: 2px solid var(--wp--preset--color--black) !important;
}

.mp_wrapper textarea:hover, .mp_wrapper select:hover, .mp_wrapper input[type=text]:hover, .mp_wrapper input[type=url]:hover, .mp_wrapper input[type=email]:hover, .mp_wrapper input[type=tel]:hover, .mp_wrapper input[type=number]:hover, .mp_wrapper input[type=password]:hover, .mp_wrapper .iti__selected-flag:hover {
    border-color: var(--wp--preset--color--gray);
}

.mepr-login-actions a {
    font-family: var(--wp--preset--font-family--centra-mono);
    text-decoration: none;
}

.mepr-login-actions a:hover {
    text-decoration: underline;
}

.mp_wrapper h3 {
    margin-bottom: var(--three-spacer);
    font-size: var(--wp--preset--font-size--large);
    font-weight: 500;
}

.submit input[type=submit] {
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--black);
    border-radius: 5px;
    padding: 0.8em 1.1em;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--centra-no2);
    font-size: var(--wp--preset--font-size--large);
    font-weight: 500;
    border: 1px solid var(--wp--preset--color--black);
}

.submit input[type=submit]:hover {
    color: var(--wp--preset--color--black);
    background-color: var(--wp--preset--color--light-yellow);
    border: 1px solid var(--wp--preset--color--black);
}

.mp_wrapper .mepr-account-form .mepr-submit {
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--black);
    border-radius: 5px;
    padding: 0.8em 1.1em;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--centra-no2);
    font-size: var(--wp--preset--font-size--large);
    font-weight: 500;
    border: 1px solid var(--wp--preset--color--black);
}

.mp_wrapper .mepr-account-form .mepr-submit:hover {
    color: var(--wp--preset--color--black);
    background-color: var(--wp--preset--color--light-yellow);
    border: 1px solid var(--wp--preset--color--black);
}

.mepr-account-change-password {
    font-family: var(--wp--preset--font-family--centra-mono);
    font-size: var(--wp--preset--font-size--medium);
}

.mepr-account-change-password a {
    text-decoration: none;
}

.mepr-account-change-password a:hover {
    text-decoration: underline;
}

.mepr-no-active-subscriptions, .mp-wrapper.mp-no-subs {
    font-size: var(--wp--preset--font-size--large);
}

.mepr-submit {
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--black);
    border-radius: 5px;
    padding: 0.8em 1.1em;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--centra-no2);
    font-size: var(--wp--preset--font-size--large);
    font-weight: 500;
    border: 1px solid var(--wp--preset--color--black);
    margin-bottom: var(--two-spacer);
}

.mepr-submit:hover {
    color: var(--wp--preset--color--black);
    background-color: var(--wp--preset--color--light-yellow);
    border: 1px solid var(--wp--preset--color--black);
}

.mp_wrapper textarea:focus-visible, .mp_wrapper select:focus-visible, .mp_wrapper input[type=text]:focus-visible, .mp_wrapper input[type=url]:focus-visible, .mp_wrapper input[type=email]:focus-visible, .mp_wrapper input[type=tel]:focus-visible, .mp_wrapper input[type=number]:focus-visible, .mp_wrapper input[type=password]:focus-visible, .mp_wrapper .iti__selected-flag:focus-visible {
    border: 2px solid var(--wp--preset--color--gray);
    background-color: var(--wp--preset--color--lightest-gray);
}

.mp-form-row.mepr_bold.mepr_price {
    margin-bottom: var(--three-spacer);
    padding: var(--one-spacer) var(--two-spacer);
    background-color: var(--wp--preset--color--lightest-gray);
    border-radius: 5px;
}

.button.mp-hide-pw {
    color: var(--wp--preset--color--dark-gray);
    padding: 1rem !important;
    top: -5px;
}

.button.mp-hide-pw:hover {
    color: var(--wp--preset--color--black);
}

.mepr_price_cell_label {
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--black);
    font-weight: 500;
    display: inline-block;
}

.mepr_price_cell {
    font-size: var(--wp--preset--font-size--large);
}

.mp_wrapper textarea, .mp_wrapper select, .mp_wrapper input[type=text], .mp_wrapper input[type=url], .mp_wrapper input[type=email], .mp_wrapper input[type=tel], .mp_wrapper input[type=number], .mp_wrapper input[type=password] {
    width: 100%;
    font-weight: 500;
    outline-style: none;
    font-size: var(--wp--preset--font-size--large);
    font-family: inherit;
    padding: 10px;
    letter-spacing: normal;
    border: 2px solid var(--wp--preset--color--light-gray);
    margin-bottom: 10px !important;
    display: inline;
    border-radius: 5px;
    box-sizing: border-box;
}

.mepr-price-menu .mepr-price-boxes .mepr-price-box-title {
    margin-top: var(--two-spacer);
    padding-top: var(--two-spacer);
    margin-bottom: var(--two-spacer);
    font-size: var(--wp--preset--font-size--medium) !important;
    text-transform: uppercase;
    font-weight: normal;
    letter-spacing: 1px;
    color: var(--wp--preset--color--dark-gray) !important;
    font-family: var(--wp--preset--font-family--centra-mono);
}

/* Podcast single header */
.podcast-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.podcast-featured-image {
    flex-shrink: 0;
    width: calc((var(--responsive--alignwide-width) - var(--responsive--aligndefault-width)) / 2 - 1.5rem);
    margin-left: calc((var(--responsive--aligndefault-width) - var(--responsive--alignwide-width)) / 2);
}

.podcast-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 0px;
}

@media (max-width: 768px) {
    .podcast-header {
        flex-direction: column;
    }
    .podcast-featured-image {
        margin-left: 0;
        width: 100%;
        max-width: 300px;
    }
}

/* MemberPress account nav — styled like office tabs */
#mepr-account-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

#mepr-account-nav li.mepr-nav-item {
    margin: var(--one-spacer);
}

#mepr-account-nav li.mepr-nav-item:first-child {
    margin-left: 0;
}

#mepr-account-nav li.mepr-nav-item a {
    display: block;
    color: var(--wp--preset--color--light-gray);
    font-weight: 700;
    padding-top: 10px;
    border-top: 1px solid var(--wp--preset--color--light-gray);
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    font-size: var(--wp--preset--font-size--medium);
    font-family: inherit;
}

#mepr-account-nav li.mepr-nav-item a:hover {
    color: var(--wp--preset--color--black);
}

#mepr-account-welcome-message p {
    display: none;
}

.mepr_updated {
    background-color: var(--wp--preset--color--light-yellow) !important;
    border: 1px solid var(--wp--preset--color--black) !important;
}

#mepr-account-nav li.mepr-nav-item.mepr-active-nav-tab a {
    padding-top: 8px;
    border-top: 3px solid var(--wp--preset--color--black);
    color: var(--wp--preset--color--black);
}

/* Logout button — pushed right, styled as an outline button */
#mepr-account-nav li.mepr-nav-item:last-child {
    margin-left: auto;
    margin-right: 0;
}

#mepr-account-nav li.mepr-nav-item:last-child a {
    border-top: none;
    padding-top: 0;
    border: 2px solid var(--wp--preset--color--light-gray);
    border-radius: 5px;
    padding: 6px 12px;
    font-weight: normal;
    font-family: var(--wp--preset--font-family--centra-mono), monospace;
    font-size: var(--wp--preset--font-size--small);
    color: inherit;
    transition: all 0.2s;
}

#mepr-account-nav li.mepr-nav-item:last-child a:hover {
    background-color: var(--wp--preset--color--light-gray);
    color: var(--wp--preset--color--black);
}
/* ── Search Tabs ── */
.search-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: var(--three-spacer);
}

.search-tab-btn {
	display: inline-flex;
	align-items: center;
    font-family: var(--wp--preset--font-family--centra-no2);
    font-weight: 600;
	gap: 0.4rem;
	padding: 0.6rem 1rem;
	text-decoration: none;
	color: var(--wp--preset--color--dark-gray);
	border: none;
	margin-bottom: -2px;
	font-size: var(--wp--preset--font-size--normal);
	white-space: nowrap;
    border-radius: 100px;
	transition: color 0.15s, border-color 0.15s;
}

.search-tab-btn:hover {
	color: var(--wp--preset--color--black);
	background-color: var(--wp--preset--color--lightest-gray);
	text-decoration: none;
}

.search-tab-btn:hover .search-tab-count {
	background-color: var(--wp--preset--color--black);
}

.search-tab-btn.active {
	color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--black);
	font-weight: 600;
	border: none;
    border-radius: 100px;
}

.search-tab-btn.empty {
	display: none;
}

.search-tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--dark-gray);
	color: var(--wp--preset--color--white);
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--x-small);
	font-family: var(--wp--preset--font-family--centra-mono), monospace;
	padding: 0.1em 0.5em;
	min-width: 1.5em;
}

.search-tab-btn.active .search-tab-count {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black);
}

.section-header-actions {
	flex-shrink: 0;
}

.button-small {
	font-size: var(--wp--preset--font-size--small) !important;
	padding: 0.25rem 0.75rem !important;
}

.section-view-more {
	text-align: center;
	padding: 0.5rem 0 1rem;
}

.search-section-subheading {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gray);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	margin-top: 0;
}

.search-pagination {
	padding: 1rem 0 1.5rem;
}

.entry-content > .past-election-banner {
	position: fixed;
	width: 100%;
	max-width: 100%;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background-color: rgba(255, 255, 255, 0.9);
	color: var(--wp--preset--color--black);
	text-align: center;
	padding: 1.5rem var(--two-spacer);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	margin-bottom: 0;
	border-top: 2px solid var(--wp--preset--color--light-gray);
}

.past-election-banner a {
	color: var(--wp--preset--color--black);
	text-decoration: underline;
}

.past-election-banner--print-top {
	display: none;
}

.results-pct-print {
	display: none;
}

.candidates-print-layout {
	display: none;
}

@media print {
	html {
		font-size: 62.5%; /* 1rem = 10px (down from 16px default) */
	}

	.no-print {
		display: none !important;
	}

	.person-card-image,
	.candidate-image-wrapper img,
	.incumbent-image-wrapper img {
		filter: none !important;
	}

	.person-card-image-overlay,
	.candidate-image-overlay {
		display: none !important;
	}

	button,
	.button,
	.button-outline,
	.wp-block-button {
		display: none !important;
	}

	.wp-block-ie-export,
	.wp-block-ie-share,
	.wp-block-ie-analysis,
	.wp-block-ie-podcasts,
	.block-podcasts,
	.block-export,
	.analysis {
		display: none !important;
	}

	/* Page break after the ratings columns */
	.ratings-bar-house {
		break-after: page;
	}

	/* ── DISTRICT DETAIL HERO: 3-column print layout ── */

	/* Flatten hero to 3 columns: [district info | rating+baseline | map] */
	.hero-section .grid.alignwide {
		display: grid !important;
		grid-template-columns: 1fr 0.8fr 1.2fr !important;
		gap: 1rem !important;
		align-items: start;
	}

	/* Left col stays in col 1 */
	.hero-section .grid-xl-col-6:first-child {
		grid-column: 1 !important;
		width: auto !important;
		max-width: none !important;
	}

	/* Collapse right-side wrappers so rating-section and map-section become direct grid children */
	.hero-section .grid-xl-col-6:last-child,
	.hero-section .info-card,
	.hero-section .info-card-content {
		display: contents !important;
	}

	/* Rating + baseline → col 2 */
	.hero-section .rating-section {
		grid-column: 2 !important;
		grid-row: 1 !important;
	}

	/* Map → col 3 */
	.hero-section .map-section {
		grid-column: 3 !important;
		grid-row: 1 !important;
	}

	/* Rating circle: ensure color prints */
	.rating-circle.rating-badge {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	/* Hide buttons/links in hero */
	.rating-section-header .button-outline,
	.edit-link,
	.baseline-header .button-outline {
		display: none !important;
	}

	/* ── MAIN CONTENT GRID: full-width columns ── */

	/* Collapse 8/4 sidebar grid to stacked full-width */
	.alignwide > .grid {
		display: block !important;
	}

	.alignwide > .grid > .grid-lg-col-8,
	.alignwide > .grid > .grid-lg-col-4 {
		width: 100% !important;
		max-width: none !important;
		padding-right: 0 !important;
	}

	/* ── CANDIDATES BLOCK: print-only layout ── */

	/* Hide the screen layout, show the print-only layout */
	.candidates-screen-layout {
		display: none !important;
	}

	.candidates-print-layout {
		display: block !important;
	}

	/* Incumbents: 2-col table layout (most reliable for small fixed sets) */
	.print-persons-grid--incumbents {
		display: table !important;
		width: 100% !important;
		table-layout: fixed !important;
		border-collapse: separate !important;
		border-spacing: 1rem 0 !important;
	}

	.print-persons-grid--incumbents .print-candidate-card {
		display: table-cell !important;
		vertical-align: top !important;
	}

	/* Candidates: 3-col inline-block (wraps to new rows, reliable in Chrome print) */
	.print-persons-grid--candidates {
		font-size: 0 !important;
	}

	.print-persons-grid--candidates .print-candidate-card {
		display: inline-block !important;
		vertical-align: top !important;
		width: 33.333% !important;
		padding-right: 1rem !important;
		box-sizing: border-box !important;
		font-size: 1rem !important;
	}

	.print-persons-grid--candidates .print-candidate-card:nth-child(3n) {
		padding-right: 0 !important;
	}

	/* Keep heading tied to the cards below it */
	.print-incumbents > h3,
	.print-candidates > h3 {
		break-after: avoid !important;
	}

	/* Page break after incumbents section */
	.print-incumbents {
		break-after: page;
	}

	/* Inner wrapper: image + info side-by-side */
	.print-card-top {
		display: flex !important;
		gap: 1rem !important;
		align-items: flex-start !important;
		margin-bottom: 0.5rem;
	}

	/* Remove inherited candidate-item spacing (now a table-cell) */
	.print-candidate-card {
		border-top: none !important;
		padding-top: 0 !important;
		margin-bottom: 0 !important;
	}

	.print-candidate-card .past-elections {
		margin-bottom: 0 !important;
	}

	.print-candidate-card .committee-assignments h4 {
		margin-top: 0 !important;
	}

	/* Force party badge and VAR badge colors to print */
	.print-candidate-card .party-badge,
	.print-candidate-card .var-badge {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	/* Hide VAR help icon in print */
	.print-candidate-card .var-help-link {
		display: none !important;
	}

	/* ── FINANCE: page break after ── */
	.wp-block-ie-finance-data {
		break-after: page;
	}

	/* Force bar segment background colors and threshold line to print */
	.block-ratings-bar,
	.ratings-bar-segment,
	.ratings-column-heading,
	.ratings-party-badge,
	.map-ratings-bar__segment,
	.ratings-threshold-line {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	/* Tighter font/spacing on ratings list */
	.ratings-bar-house .ratings-column li,
	.ratings-bar-senate .ratings-column li {
		font-size: 14px !important;
		padding-top: 5px !important;
		padding-bottom: 5px !important;
	}

	.ratings-bar-house .ratings-column li .rb-incumbent {
		font-size: 13px !important;
	}

	.ratings-bar-senate,
	.ratings-bar-house {
		page-break-after: always;
	}

	.wp-block-ie-ratings-map {
		overflow: hidden !important;
		height: 491px !important;
		background-color: #f5f5f5 !important;
	}

	.map-wrapper {
		transform: scale(0.78);
		transform-origin: top center;
	}

	/* Two-class selector beats block.php's single-class !important */
	.map-wrapper .ratings-map {
		overflow: visible !important;
	}

	/* ── PAST ELECTIONS: force bar colors and expand collapsible sections ── */

	/* Hide bar charts, show inline percentages */
	.results-bar {
		display: none !important;
	}

	.results-pct-print {
		display: inline !important;
	}

	/* Expand collapsed past-elections sections */
	.collapsible-container.collapsible-content-hidden .collapsible-section {
		height: auto !important;
		max-height: none !important;
		visibility: visible !important;
	}

	/* Hide Show All / Collapse buttons */
	.collapse-button {
		display: none !important;
	}

	/* ── PAST RATINGS: show all hidden items and print badge colors ── */

	/* Show all hidden ratings and year groups */
	.past-rating-item.hidden-rating {
		display: flex !important;
	}

	.year-group.hidden-year-group {
		display: block !important;
	}

	/* Hide More button */
	.see-more-container {
		display: none !important;
	}

	/* ── HERO BREADCRUMB: override alignment.css hide, strip background, force black text ── */
	.hero-section .breadcrumb {
		display: flex !important;
	}

	/* ── HERO BREADCRUMB: strip background, force black text ── */
	.hero-section,
	.hero-bg-democrat,
	.hero-bg-republican,
	.hero-bg-independent {
		background-color: transparent !important;
		background-image: none !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.hero-section,
	.hero-section *,
	.hero-section .breadcrumb,
	.hero-section .breadcrumb-link,
	.hero-section .breadcrumb-separator {
		color: #000 !important;
	}

	/* ── BREADCRUMB YEAR SELECT: strip to plain text ── */
	.select-wrapper {
		display: contents !important;
	}

	.select-wrapper::after {
		display: none !important;
	}

	.breadcrumb-select {
		appearance: none !important;
		-webkit-appearance: none !important;
		background: transparent !important;
		border: none !important;
		padding: 0 !important;
		pointer-events: none !important;
		font-size: inherit !important;
		color: inherit !important;
		width: auto !important;
	}

	/* Force rating badge background colors to print */
	.rating-name {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	/* ── PAST ELECTION BANNER: show print-top copy, hide fixed bottom banner ── */

	/* Print-only banner (rendered at top of page, hidden on screen) */
	.past-election-banner--print-top {
		display: block !important;
		position: static !important;
		width: 100% !important;
		border-bottom: 2px solid var(--wp--preset--color--light-gray) !important;
		border-top: none !important;
		margin-bottom: 1rem !important;
	}

	/* Hide the fixed bottom banner on print */
	.entry-content > .past-election-banner {
		display: none !important;
	}
}
