:root {
  --candidate-navy-deep: #071f2f;
  --candidate-navy: #0b3048;
  --candidate-blue: #174b67;
  --candidate-ink: #14232c;
  --candidate-muted: #61717c;
  --candidate-paper: #f3f0e7;
  --candidate-surface: #fff;
  --candidate-line: #d0d9dd;
  --candidate-gold: #d8ad5f;
  --candidate-gold-soft: #f4e5bd;
  --candidate-teal: #14766e;
  --candidate-red: #a64a42;
  --candidate-shadow: 0 16px 38px rgba(8, 32, 47, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--candidate-ink);
  background: var(--candidate-paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.candidate-directory-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 76px;
  align-items: center;
  gap: 24px;
  padding: 11px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(7, 31, 47, 0.97);
  backdrop-filter: blur(16px);
}

.candidate-directory-brand {
  display: inline-flex;
}

.candidate-directory-brand img {
  display: block;
  width: auto;
  height: 48px;
}

.candidate-directory-region {
  width: max-content;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.candidate-directory-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2.4vw, 30px);
}

.candidate-directory-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
  font-weight: 780;
  text-decoration: none;
}

.candidate-directory-nav a:hover,
.candidate-directory-nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.candidate-directory-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(112deg, rgba(7, 31, 47, 0.99), rgba(13, 55, 79, 0.95) 62%, rgba(27, 82, 102, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(255, 255, 255, 0.025) 63px 64px);
}

.candidate-directory-hero::before {
  position: absolute;
  top: 0;
  right: clamp(18px, 7vw, 120px);
  width: min(34vw, 470px);
  height: 100%;
  border-right: 1px solid rgba(216, 173, 95, 0.18);
  border-left: 1px solid rgba(216, 173, 95, 0.18);
  content: "";
  opacity: 0.72;
  transform: skewX(-12deg);
}

.candidate-directory-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.7fr);
  gap: clamp(44px, 7vw, 112px);
  align-items: end;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(60px, 8vw, 116px) clamp(22px, 5vw, 76px) clamp(72px, 9vw, 128px);
}

.candidate-directory-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 760;
}

.candidate-directory-breadcrumbs a {
  color: rgba(255, 255, 255, 0.82);
  text-underline-offset: 3px;
}

.candidate-directory-kicker,
.candidate-directory-eyebrow {
  margin: 0 0 12px;
  color: var(--candidate-gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.candidate-directory-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 6.5vw, 6.4rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.94;
  text-wrap: balance;
}

.candidate-directory-intro {
  max-width: 780px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.72;
}

.candidate-directory-scorecard {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 26px;
  background: rgba(5, 25, 39, 0.68);
  box-shadow: 0 22px 55px rgba(0, 12, 20, 0.26);
}

.candidate-directory-scorecard::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 76px;
  height: 4px;
  border-radius: 9px 0 4px;
  content: "";
  background: var(--candidate-gold);
}

.candidate-directory-scorecard > p {
  margin: 0;
  color: var(--candidate-gold-soft);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.candidate-directory-scorecard dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin: 24px 0;
}

.candidate-directory-scorecard dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.62rem;
  font-weight: 780;
  text-transform: uppercase;
}

.candidate-directory-scorecard dd {
  margin: 7px 0 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 860;
  letter-spacing: -0.04em;
}

.candidate-directory-scorecard small {
  display: block;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  line-height: 1.5;
}

.candidate-directory-guide,
.candidate-directory-method {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.35fr);
  gap: clamp(38px, 8vw, 130px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 86px) clamp(22px, 5vw, 76px);
}

.candidate-directory-guide {
  align-items: center;
}

.candidate-directory-guide h2,
.candidate-directory-method h2,
.candidate-browser-heading h2 {
  margin: 0;
  color: var(--candidate-navy-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.candidate-directory-guide > p {
  margin: 0;
  padding-left: clamp(24px, 4vw, 58px);
  border-left: 3px solid var(--candidate-gold);
  color: #41545f;
  font-size: 1rem;
  line-height: 1.85;
}

.candidate-directory-browser {
  padding: clamp(48px, 6vw, 86px) clamp(22px, 5vw, 76px) clamp(72px, 8vw, 118px);
  border-top: 1px solid #ccd6db;
  border-bottom: 1px solid #ccd6db;
  background: #eaf0f2;
}

.candidate-browser-heading,
.candidate-directory-controls,
.candidate-disclosure-callout,
.candidate-category-shortcuts,
.candidate-results-head,
.candidate-grid,
.candidate-directory-empty,
.candidate-show-more {
  width: min(100%, 1440px);
  margin-right: auto;
  margin-left: auto;
}

.candidate-browser-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.candidate-directory-status {
  max-width: 340px;
  margin: 0 0 7px;
  color: var(--candidate-muted);
  font-size: 0.77rem;
  font-weight: 760;
  text-align: right;
}

.candidate-directory-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(7, minmax(108px, 0.7fr)) auto;
  gap: 12px;
  margin-top: 38px;
  padding: 20px;
  border: 1px solid #c6d3d9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(8, 32, 47, 0.06);
}

.candidate-directory-controls label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.candidate-directory-controls label > span {
  color: #52636e;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.candidate-directory-controls input,
.candidate-directory-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #bfcbd1;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--candidate-ink);
  background: #fbfcfc;
  font-size: 0.76rem;
  font-weight: 650;
}

.candidate-directory-controls input:focus,
.candidate-directory-controls select:focus {
  border-color: var(--candidate-blue);
  outline: 3px solid rgba(23, 75, 103, 0.15);
}

.candidate-clear-filters {
  align-self: end;
  min-height: 46px;
  border: 1px solid var(--candidate-navy);
  border-radius: 6px;
  padding: 10px 17px;
  color: var(--candidate-navy);
  background: transparent;
  font-size: 0.73rem;
  font-weight: 850;
  cursor: pointer;
}

.candidate-clear-filters:hover,
.candidate-clear-filters:focus-visible {
  color: #fff;
  background: var(--candidate-navy);
}

.candidate-disclosure-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  border: 1px solid #dcc49e;
  border-radius: 7px;
  padding: 15px 18px;
  color: #5f461f;
  background: #fbf4e7;
}

.candidate-disclosure-callout > div {
  display: grid;
  gap: 4px;
}

.candidate-disclosure-callout span {
  color: #8a6529;
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.candidate-disclosure-callout strong {
  color: #493719;
  font-size: 0.76rem;
}

.candidate-disclosure-callout small {
  color: #7a6749;
  font-size: 0.67rem;
}

.candidate-disclosure-callout a {
  flex: 0 0 auto;
  color: var(--candidate-navy);
  font-size: 0.73rem;
  font-weight: 880;
  text-decoration: none;
}

.candidate-disclosure-callout a:hover,
.candidate-disclosure-callout a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.candidate-category-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.candidate-category-shortcuts button {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #c5d0d5;
  border-radius: 7px;
  padding: 9px 11px;
  color: #43555f;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
}

.candidate-category-shortcuts button > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--candidate-blue);
  font-size: 0.58rem;
  font-weight: 900;
}

.candidate-category-shortcuts button strong {
  overflow: hidden;
  font-size: 0.7rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.candidate-category-shortcuts button small {
  color: #7b8a92;
  font-size: 0.68rem;
  font-weight: 800;
}

.candidate-category-shortcuts button:hover,
.candidate-category-shortcuts button:focus-visible,
.candidate-category-shortcuts button.is-active {
  border-color: var(--candidate-navy);
  color: var(--candidate-navy-deep);
  background: #fff;
  box-shadow: 0 5px 13px rgba(8, 32, 47, 0.07);
}

.candidate-category-shortcuts button.is-active {
  box-shadow: inset 0 -3px 0 var(--candidate-gold);
}

.candidate-results-head {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 36px;
  padding-bottom: 15px;
  border-bottom: 1px solid #c6d0d5;
}

.candidate-results-head p {
  margin: 0;
  color: #667780;
  font-size: 0.72rem;
}

.candidate-results-head p:first-child {
  color: var(--candidate-navy-deep);
  font-weight: 850;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-top: 20px;
}

.candidate-directory-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 480px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #c8d3d8;
  border-radius: 9px;
  background: var(--candidate-surface);
  box-shadow: 0 6px 18px rgba(8, 32, 47, 0.055);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.candidate-directory-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  content: "";
  background: var(--candidate-blue);
}

.candidate-directory-card[data-status="on_ballot"]::before {
  background: var(--candidate-gold);
}

.candidate-directory-card[data-status="elected"]::before {
  background: var(--candidate-teal);
}

.candidate-directory-card[data-status="did_not_advance"]::before {
  background: #8f9ca3;
}

.candidate-directory-card:hover {
  border-color: #98acb6;
  box-shadow: var(--candidate-shadow);
  transform: translateY(-2px);
}

.candidate-card-head {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 22px 17px;
}

.candidate-card-avatar {
  position: relative;
  display: grid;
  width: 66px;
  height: 76px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #c0cdd3;
  border-radius: 5px 5px 22px 5px;
  color: #fff;
  background: linear-gradient(145deg, var(--candidate-blue), var(--candidate-navy-deep));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.candidate-card-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate-card-avatar img[hidden] {
  display: none;
}

.candidate-card-category {
  margin: 1px 0 7px;
  color: #6c7c85;
  font-size: 0.61rem;
  font-weight: 880;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.candidate-card-head h3 {
  margin: 0;
  color: var(--candidate-navy-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.candidate-card-head h3 a {
  text-decoration: none;
}

.candidate-card-head h3 a:hover,
.candidate-card-head h3 a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--candidate-gold);
  text-underline-offset: 4px;
}

.candidate-card-designation {
  margin: 8px 0 0;
  color: #52646f;
  font-size: 0.72rem;
  line-height: 1.45;
}

.candidate-card-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 22px 18px;
}

.candidate-status-badge,
.candidate-party-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.62rem;
  font-weight: 840;
  line-height: 1;
}

.candidate-status-badge {
  color: #113f3a;
  background: #dcedea;
}

[data-status="on_ballot"] .candidate-status-badge {
  color: #5b4010;
  background: var(--candidate-gold-soft);
}

[data-status="did_not_advance"] .candidate-status-badge {
  color: #58666d;
  background: #e8edef;
}

.candidate-party-badge {
  color: #4d606b;
  background: #edf1f3;
}

.candidate-disclosure-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid #d6dee2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #52636d;
  background: #fff;
  font-size: 0.61rem;
  font-weight: 790;
  line-height: 1;
}

.candidate-disclosure-badge.is-missing {
  border-color: #e2c9a8;
  color: #6e4b18;
  background: #fbf3e5;
}

.candidate-card-office {
  margin: 0 22px;
  padding: 16px 0;
  border-top: 1px solid #dce3e6;
  border-bottom: 1px solid #dce3e6;
}

.candidate-card-office > span {
  display: block;
  margin-bottom: 6px;
  color: #74838b;
  font-size: 0.59rem;
  font-weight: 850;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.candidate-card-office a {
  color: var(--candidate-navy);
  font-size: 0.83rem;
  font-weight: 820;
  line-height: 1.35;
  text-decoration: none;
}

.candidate-card-office a:hover,
.candidate-card-office a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.candidate-appearances {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 16px 22px;
  list-style: none;
}

.candidate-appearance {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: #5b6c75;
  font-size: 0.68rem;
}

.candidate-appearance time {
  font-weight: 780;
}

.candidate-appearance span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-appearance strong {
  color: var(--candidate-navy-deep);
  font-size: 0.68rem;
  font-weight: 830;
}

.candidate-money-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: auto;
  border-top: 1px solid #d6dfe3;
  background: #d6dfe3;
}

.candidate-money-strip div {
  padding: 14px 18px;
  background: #f5f7f7;
}

.candidate-money-strip span {
  display: block;
  color: #6c7c84;
  font-size: 0.59rem;
  font-weight: 830;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.candidate-money-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--candidate-navy-deep);
  font-size: 0.86rem;
  font-weight: 850;
}

.candidate-money-strip strong.is-unknown {
  color: #7a888f;
  font-size: 0.7rem;
  font-weight: 700;
}

.candidate-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px 19px;
  border-top: 1px solid #d6dfe3;
  color: #718087;
  font-size: 0.66rem;
}

.candidate-card-foot a {
  color: var(--candidate-navy);
  font-weight: 870;
  text-decoration: none;
}

.candidate-card-foot a:hover,
.candidate-card-foot a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.candidate-directory-empty,
.candidate-directory-error {
  margin-top: 20px;
  border: 1px dashed #aebdc4;
  border-radius: 9px;
  padding: 48px 24px;
  color: #52646f;
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.candidate-directory-empty strong,
.candidate-directory-error strong {
  color: var(--candidate-navy-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.candidate-directory-empty p,
.candidate-directory-error p {
  margin: 9px 0 0;
}

.candidate-show-more {
  display: block;
  margin-top: 28px;
  border: 1px solid var(--candidate-navy);
  border-radius: 6px;
  padding: 13px 22px;
  color: #fff;
  background: var(--candidate-navy);
  font-size: 0.75rem;
  font-weight: 850;
  cursor: pointer;
}

.candidate-show-more:hover,
.candidate-show-more:focus-visible {
  background: var(--candidate-blue);
}

.candidate-show-more[hidden] {
  display: none;
}

.candidate-directory-method > div:last-child {
  color: #4c5e68;
  line-height: 1.75;
}

.candidate-directory-method p {
  margin: 0 0 16px;
}

.candidate-directory-method small {
  color: #748188;
}

.candidate-directory-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px clamp(22px, 5vw, 76px);
  color: rgba(255, 255, 255, 0.68);
  background: var(--candidate-navy-deep);
  font-size: 0.7rem;
  font-weight: 730;
}

.candidate-directory-footer a {
  color: #fff;
  text-underline-offset: 3px;
}

@media (max-width: 1240px) {
  .candidate-directory-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .candidate-search-control {
    grid-column: span 2;
  }

  .candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .candidate-directory-header {
    grid-template-columns: auto 1fr;
  }

  .candidate-directory-nav {
    display: none;
  }

  .candidate-directory-hero-inner,
  .candidate-directory-guide,
  .candidate-directory-method {
    grid-template-columns: 1fr;
  }

  .candidate-directory-scorecard {
    max-width: 520px;
  }

  .candidate-directory-guide > p {
    padding: 0 0 0 24px;
  }

  .candidate-category-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .candidate-directory-header {
    min-height: 66px;
    gap: 14px;
    padding: 9px 16px;
  }

  .candidate-directory-brand img {
    height: 40px;
  }

  .candidate-directory-region {
    padding-left: 14px;
    font-size: 0.61rem;
  }

  .candidate-directory-hero-inner {
    padding-right: 18px;
    padding-left: 18px;
  }

  .candidate-directory-hero h1 {
    font-size: clamp(3rem, 15vw, 4.4rem);
  }

  .candidate-directory-controls,
  .candidate-grid,
  .candidate-category-shortcuts {
    grid-template-columns: 1fr;
  }

  .candidate-search-control {
    grid-column: auto;
  }

  .candidate-browser-heading,
  .candidate-results-head,
  .candidate-disclosure-callout,
  .candidate-directory-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .candidate-browser-heading,
  .candidate-results-head,
  .candidate-directory-footer {
    display: flex;
  }

  .candidate-directory-status {
    text-align: left;
  }

  .candidate-directory-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .candidate-directory-card {
    transition: none;
  }
}
