/* Precinct profile callout additions */

/* Together New Orleans horizontal logo in the header. */
.tno-logo {
  display: block;
  justify-self: start;
  width: min(250px, 100%);
  height: auto;
  object-fit: contain;
}

.result-card {
  width: min(350px, calc(100% - 24px));
}

.result-card-inner {
  padding-bottom: 15px;
}

/* Stronger callout hierarchy: precinct + voter count are the primary answer. */
.result-address {
  display: none;
}

.result-stat-grid {
  display: block;
  padding-top: 2px;
}

.result-stat + .result-stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 8px;
  padding: 0;
  border: 0;
}

.result-stat + .result-stat .result-label,
.result-voters-note {
  display: none;
}

.result-stat + .result-stat::after {
  content: "registered voters";
  color: #5f6875;
  font-size: 15px;
  line-height: 1;
  font-weight: 750;
  white-space: nowrap;
}

.result-precinct {
  margin-top: 5px;
  color: #00205c;
  font-size: 48px;
  line-height: .94;
  font-weight: 950;
  letter-spacing: -.035em;
}

/* Make voter count the strong secondary data point, as in the approved mockup. */
.result-voters {
  margin-top: 0;
  color: #d99b00;
  font-size: 44px;
  line-height: .92;
  font-weight: 950;
  letter-spacing: -.03em;
}

.profile-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #dfe3e8;
}

.profile-heading {
  margin-bottom: 9px;
  color: #00205c;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Rename the visible Race heading to Demographics without changing data logic. */
.profile-section:not(.profile-section-party) .profile-heading {
  font-size: 0;
}

.profile-section:not(.profile-section-party) .profile-heading::after {
  content: "DEMOGRAPHICS";
  font-size: 11px;
}

/* Compact, left-aligned percentages with no separate boxes. */
.profile-grid {
  display: flex;
  grid-template-columns: none;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
}

.profile-item {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  border-top: 0;
}

.profile-item span,
.profile-item strong {
  display: block;
}

.profile-item span {
  overflow: visible;
  color: #5f6875;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 800;
  text-overflow: clip;
  white-space: nowrap;
}

/* Keep profile percentages clearly subordinate to precinct and voter count. */
.profile-item strong,
.profile-section-party .profile-item strong {
  margin-top: 3px;
  color: #00205c;
  font-size: 14px;
  line-height: 1;
  font-weight: 950;
}

.profile-note {
  margin-top: 8px;
  color: #737c88;
  font-size: 8.5px;
  line-height: 1.25;
}

.result-leader line {
  stroke-width: 2.4;
}

/* Keep the tool title on one line and place the search prompt directly over the field. */
.tool-heading h1 {
  white-space: nowrap;
  font-size: clamp(24px, 2vw, 34px);
}

.lookup-actions {
  display: block;
}

.search-prompt {
  grid-column: 1 / -1;
  display: block;
  margin-bottom: -1px;
  color: #ffb600;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 900;
}

.lookup-instructions {
  margin-top: 8px;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.28;
}

@media (max-width: 1120px) {
  .tno-logo {
    width: 205px;
  }
}

@media (max-width: 900px) {
  .tno-logo {
    grid-row: 1 / span 2;
    width: 174px;
  }

  .tool-heading h1 {
    font-size: 27px;
  }
}

@media (max-width: 620px) {
  .tno-logo {
    grid-row: auto;
    width: 160px;
  }

  .result-card {
    width: min(330px, calc(100% - 18px));
  }

  .result-precinct {
    font-size: 42px;
  }

  .result-voters {
    font-size: 38px;
  }

  .result-stat + .result-stat::after {
    font-size: 13px;
  }

  .profile-grid {
    gap: 18px;
  }

  .profile-item strong,
  .profile-section-party .profile-item strong {
    font-size: 13px;
  }

  .tool-heading h1 {
    font-size: 24px;
  }

  .search-prompt {
    font-size: 12px;
  }

  .lookup-instructions {
    margin-top: 7px;
    font-size: 11.5px;
  }
}
