/* Responsive layout, typography, and media (all templates). */

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.site {
  overflow-x: clip;
}

/* Content images scale; hero stays full-bleed via .hero-image rules below. */
img {
  max-width: 100%;
  height: auto;
}

.hero-image {
  max-width: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.body-copy img,
.privacy-section img,
.intro img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.body-copy,
.lede,
.platform-list .text,
.leader p,
.privacy-section p,
.callout p,
.section-title,
.subhead,
.hero h1 {
  overflow-wrap: break-word;
}

/* Comfortable line length for long copy blocks. */
.body-copy,
.closing p,
.privacy-intro,
.privacy-section p,
.fusion-grid .body-copy {
  max-width: 65ch;
}

.lede {
  max-width: 42em;
}

.callout p {
  max-width: min(24em, 100%);
}

.hero h1,
.section-title,
.callout p {
  text-wrap: balance;
}

/* Fluid type — fixed 17px body text scales down on narrow viewports. */
.body-copy,
.platform .platform-intro,
.closing p,
.platform-list .text,
.leader p,
.privacy-intro,
.privacy ol,
.privacy ul,
.privacy-section p,
.not-found .lede,
.card-body .vote-for,
.card.winner .card-body > p,
.bar-label .bar-name,
.bar-label .bar-detail,
.legend,
.paid-for,
.footer-brand .footer-email {
  font-size: clamp(15px, 2.35vw, 17px);
  line-height: 1.75;
}

.lede {
  font-size: clamp(17px, 2.8vw, 23px);
  line-height: 1.55;
}

.leader h2 {
  font-size: clamp(20px, 4.5vw, 23px);
}

.leader .role {
  font-size: clamp(11px, 2.5vw, 12px);
}

.privacy-section h2 {
  font-size: clamp(19px, 4.8vw, 22px);
}

.candidate .name {
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.35;
}

.candidate .party {
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.35;
}

.ballot-row .pct {
  font-size: clamp(16px, 4vw, 18px);
}

.card.winner .card-head {
  font-size: clamp(15px, 4vw, 17px);
  line-height: 1.25;
}

/* Tighter horizontal padding on small screens (sections use 28px in mem.css). */
@media (max-width: 700px) {
  .site-header .container,
  .intro,
  .callout-wrap,
  .platform,
  .closing,
  .leadership-intro,
  .leaders,
  .fusion,
  .privacy,
  .not-found,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header .container {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .hero-home .hero-content {
    padding: 56px 16px 36px;
  }

  .hero-leadership .hero-content {
    padding: 48px 16px 28px;
  }

  .hero-home {
    min-height: min(50vh, 400px);
  }

  .hero-leadership {
    min-height: min(38vh, 300px);
  }

  .intro {
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .intro .container {
    gap: 24px 32px;
  }

  .intro .body-copy {
    gap: 14px;
  }

  .callout p {
    font-size: clamp(17px, 4.8vw, 22px);
    line-height: 1.3;
    max-width: none;
  }

  .platform .subhead {
    font-size: clamp(17px, 3.5vw, 21px);
  }

  .platform .section-title {
    font-size: clamp(24px, 6.5vw, 36px);
  }

  .fusion .section-title {
    font-size: clamp(26px, 7vw, 44px);
  }

  .privacy .section-title,
  .not-found .section-title {
    font-size: clamp(26px, 6.8vw, 40px);
  }

  .footer-brand .footer-name {
    font-size: clamp(18px, 4.5vw, 21px);
  }

  .footer-nav {
    font-size: clamp(13px, 3.2vw, 14px);
  }

  .callout-wrap {
    padding-bottom: 48px;
  }

  .platform {
    padding-bottom: 56px;
  }

  .closing {
    padding-bottom: 64px;
  }

  .fusion {
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .fusion .subhead {
    margin-bottom: 28px;
  }

  .privacy {
    padding-top: 56px;
    padding-bottom: 80px;
  }

  .site-footer {
    padding-top: 36px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .site-footer .container {
    grid-template-columns: 1fr;
    row-gap: 36px;
  }

  .paid-for {
    max-width: 28em;
  }
}

@media (max-width: 480px) {
  .hero-home {
    min-height: min(46vh, 340px);
  }

  .platform-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ballot-row {
    padding: 10px 12px;
    gap: 10px;
  }

  .ballot-row.results {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .ballot-row.results .pct {
    margin-left: auto;
  }

  .candidate {
    min-width: 0;
    flex: 1 1 auto;
  }

  .candidate .party {
    letter-spacing: 0.08em;
    line-height: 1.35;
  }

  .bar-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card-head {
    font-size: 11px;
    letter-spacing: 0.12em;
    padding: 10px 14px;
  }

  .card-body {
    padding: 14px;
  }

  .hero-home h1 {
    font-size: clamp(28px, 8.5vw, 42px);
    line-height: 1.05;
  }

  .hero-leadership h1 {
    font-size: clamp(26px, 7.5vw, 38px);
  }

  .body-copy,
  .platform-list .text,
  .leader p {
    font-size: clamp(15px, 4.1vw, 17px);
    line-height: 1.7;
  }

  .lede {
    font-size: clamp(16px, 4.5vw, 20px);
  }

  .callout p {
    font-size: clamp(16px, 5.2vw, 20px);
  }

  .privacy ol,
  .privacy ul {
    padding-left: 18px;
    gap: 8px;
  }
}

/* Desktop nav: keep one row between hamburger breakpoint and ~1200px. */
@media (max-width: 1200px) and (min-width: 1001px) {
  .site-header .container {
    gap: 12px 20px;
  }

  .main-nav {
    gap: 4px 16px;
    font-size: 14px;
  }

  .logo {
    max-width: 36vw;
  }
}

@media (max-width: 1000px) {
  .site-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 0;
  }

  .mobile-div {
    display: contents;
  }

  .logo {
    flex: 1 1 auto;
    max-width: min(158px, 50vw);
  }

  .site-header .hamburger {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .mobile-nav {
    flex: 1 1 100%;
    width: 100%;
    order: 10;
  }
}
