/* Open, student-friendly styling for the APG election guide. */
#election-2026 .voter-guide {
  max-width: 1420px;
  margin: .75rem auto 2rem;
  padding: clamp(.25rem, 2vw, 1.5rem) 0;
  color: #243443;
  font-family: var(--type-reading, Arial, sans-serif);
}

#election-2026 .voter-guide * { font-family: inherit; }
#election-2026 .voter-guide :is(h1, h2, h3, h4, h5, h6) {
  color: #1c3449;
  font-family: var(--type-display, Arial, sans-serif);
  font-weight: 650;
  letter-spacing: -.025em;
  text-transform: none;
}

#election-2026 .voter-guide .eyebrow {
  color: #587285;
  font-family: var(--type-label, Arial, sans-serif);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.voter-guide-masthead {
  max-width: 100%;
  margin-bottom: clamp(1.35rem, 2.4vw, 2rem);
  padding: .45rem 0 1.35rem;
  border-bottom: 1px solid #d7e0e5;
}
.voter-guide-masthead .eyebrow { margin: 0 0 .8rem; }
.voter-guide-masthead h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: .98;
}
.voter-guide-masthead > p:last-child {
  max-width: 76ch;
  margin: 1rem 0 0;
  color: #536575;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.guide-actions { margin: 0 0 clamp(1.5rem, 2.5vw, 2rem); }
.guide-actions > .eyebrow { margin: 0 0 .4rem; }
.guide-actions h2, .guide-section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1.12;
}
.guide-actions h2 { margin-bottom: .75rem; }
.guide-action-grid { display: grid; grid-template-columns: minmax(0, 520px); gap: 1rem; }
.guide-action-button {
  min-height: 132px;
  padding: 1.1rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .6rem 1.2rem;
  color: #fff !important;
  background: #1c4058;
  border: 1px solid #1c4058;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.guide-action-button:hover { background: #285875; border-color: #285875; transform: translateY(-2px); }
.guide-action-button:focus-visible { outline: 3px solid #173f5f; outline-offset: 3px; }
.guide-action-button span { max-width: 34ch; color: #fff; font-size: .94rem; font-weight: 800; line-height: 1.3; }
.guide-action-logo { width: 224px; height: 48px; display: block; object-fit: contain; object-position: left center; }
.guide-action-logo.calmatters-logo { width: 236px; height: 48px; object-fit: cover; object-position: center 50%; }

.guide-section { margin: 0 0 clamp(1.75rem, 3vw, 2.5rem); }
.guide-section-heading { margin-bottom: .9rem; }
.guide-section-heading .eyebrow { margin: 0 0 .35rem; }
.race-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.race-card {
  min-width: 0;
  padding: clamp(1.1rem, 2vw, 1.65rem);
  color: #263947;
  background: #fff;
  border: 1px solid #e0e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(34, 56, 70, .045);
}
.race-card-kicker { margin-bottom: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; }
.race-category { padding: .33rem .7rem; color: #255271; background: #e9f2f6; border-radius: 999px; font-size: .78rem; font-weight: 850; letter-spacing: .07em; }
.race-office { color: #687a87; font-size: .92rem; font-weight: 650; }
.race-card h3 { margin: 0 0 .75rem; font-size: clamp(1.65rem, 2.6vw, 2.25rem); line-height: 1.15; }
.race-card .race-description { max-width: 88ch; margin: 0; color: #536575; font-size: 1.06rem; line-height: 1.6; }

.candidate-list { margin: 1.05rem 0 .6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 2vw, 1.8rem); }
.candidate-list section { min-width: 0; padding: .8rem 0 .95rem; background: transparent; border: 0; border-top: 1px solid #dce4e8; }
.candidate-profile { display: grid; grid-template-columns: 10rem minmax(0, 1fr); align-items: start; gap: 1rem; }
.candidate-portrait { width: 10rem; height: 12rem; display: block; object-fit: cover; object-position: center 28%; background: #edf2f4; border: 0; border-radius: 10px; }
.candidate-identity { min-width: 0; }
.candidate-identity h4 { margin: 0 0 .35rem; font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.15; }
.candidate-identity strong { color: #547082; font-size: .82rem; font-weight: 750; letter-spacing: .035em; }
.candidate-identity p { margin: .65rem 0 0; color: #4f606c; font-size: 1rem; line-height: 1.55; }
.candidate-detail { margin-top: .8rem; padding-top: .65rem; border-top: 1px solid #e2e8eb; }
.candidate-detail h5 { margin: 0 0 .45rem; color: #597182; font-family: var(--type-label, Arial, sans-serif); font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase !important; }
.candidate-detail ul { margin: 0; padding-left: 1.25rem; color: #354b5a; font-size: .98rem; line-height: 1.6; }
.candidate-detail li + li { margin-top: .25rem; }
.candidate-detail p { margin: 0; color: #354b5a; font-size: .98rem; line-height: 1.55; }
.candidate-website { min-height: 44px; margin-top: .65rem; display: inline-flex; align-items: center; color: #286184; font-size: .9rem; font-weight: 750; text-underline-offset: 3px; }
.candidate-website:hover { color: #173f5f; }

.race-issues { margin: 1.4rem 0 0; padding: 1.15rem 0 0; background: transparent; border: 0; border-top: 1px solid #d5e0e5; }
.race-issues > h4 { margin: 0 0 .4rem; color: #1c3449; font-size: 1.25rem; }
.race-issue-row { padding: 1rem 0; border-top: 1px solid #e1e8eb; }
.race-issue-row h5 { margin: 0 0 .65rem; color: #536f80; font-family: var(--type-label, Arial, sans-serif); font-size: .9rem; font-weight: 800; letter-spacing: .02em; text-transform: none !important; }
.race-issue-row > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.8rem); }
.race-issue-row section { min-width: 0; padding: 0; background: transparent; }
.race-issue-row section strong { color: #344e60; font-size: .9rem; font-weight: 800; }
.race-issue-row section p { margin: .35rem 0 0; color: #4f606c; font-size: 1rem; font-weight: 400; line-height: 1.6; }
.race-card > a { min-height: 44px; margin-top: .65rem; display: inline-flex; align-items: center; color: #286184; font-size: .9rem; font-weight: 750; }
.race-source-list { margin-top: .4rem; }
.race-source-list summary { min-height: 44px; display: flex; align-items: center; color: #526c7c; font-size: .9rem; font-weight: 750; cursor: pointer; }
.race-source-list a { min-height: 42px; padding: .35rem 0; display: flex; align-items: center; color: #286184; font-size: .9rem; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.guide-sources { margin: 2rem 0; padding: 1.1rem 0; display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; background: transparent; border: 0; border-top: 1px solid #d7e0e5; }
.guide-sources p { width: 100%; margin: 0; color: #647681; font-size: .82rem; }
.guide-sources a { min-height: 42px; display: inline-flex; align-items: center; color: #286184; font-size: .86rem; font-weight: 700; }

@media (max-width: 900px) {
  .candidate-list, .race-issue-row > div { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  #election-2026 .voter-guide { margin-top: .25rem; }
  .voter-guide-masthead { margin-bottom: 1.5rem; padding-bottom: 1.1rem; }
  .voter-guide-masthead h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .guide-action-grid { grid-template-columns: 1fr; }
  .guide-action-button { min-height: 120px; padding: 1rem; }
  .race-card { padding: 1.2rem; border-radius: 13px; }
  .candidate-profile { grid-template-columns: 7rem minmax(0, 1fr); gap: .85rem; }
  .candidate-portrait { width: 7rem; height: 8.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-action-button { transition: none; }
}
