:root {
  --ink: #202421;
  --muted: #626864;
  --paper: #ffffff;
  --white: #ffffff;
  --line: #202421;
  --green: #178447;
  --green-dark: #202421;
  --mint: #dde2df;
  --gold: #178447;
  --coral: #178447;
  --blue: #3a4a7a;
  --shadow: 5px 5px 0 #202421;
}

body {
  color: var(--ink);
  background: #ffffff;
  font-family: Archivo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.feed-header,
.map-header,
.page-header {
  position: relative;
  top: auto;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(calc(100% - 32px), 1120px);
  margin: 16px auto 0;
  padding: 12px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none;
  backdrop-filter: none;
}

.brand {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
}

.brand-mark {
  border-radius: 8px;
}

.brand-word span {
  color: var(--coral);
}

.feed-header nav,
.map-header nav,
.page-header nav {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink);
  font-size: 0.86rem;
}

.feed-header nav a,
.map-header nav a,
.page-header nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0 11px;
  line-height: 1.05;
}

.feed-header nav a[aria-current="page"],
.map-header nav a[aria-current="page"],
.page-header nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--ink);
}

.site-menu-button {
  display: none;
  width: 48px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.site-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.site-menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.site-menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.global-search {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  justify-self: stretch;
}

.global-search input,
.global-search button,
input,
select,
textarea {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.global-search button,
.button-primary,
.button.button-primary,
.map-search button,
.card-actions button,
.dialog-close {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: #ffffff;
  background: var(--coral);
  box-shadow: none;
  font-weight: 900;
}

.eyebrow {
  color: var(--coral);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  font-size: 48px;
  line-height: 0.96;
  letter-spacing: 0;
}

h2,
.section-heading h2,
.panel-heading h2,
.feed-stream-heading h2 {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  letter-spacing: 0;
}

.feed-hero,
.initiatives-hero,
.map-hero {
  gap: 22px;
  padding: 38px clamp(18px, 5vw, 72px) 22px;
}

.feed-hero p:not(.eyebrow),
.initiatives-hero p:not(.eyebrow),
.map-hero p:not(.eyebrow),
.section-heading p,
.panel-heading p,
.map-note,
.feed-card p,
.initiative-card p,
.empty-state p,
.source-card p,
.priority-box p,
.finder-card span,
.meta-row,
.vote-card p,
.official-card p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.48;
}

.feed-controls,
.source-panel,
.feed-card,
.empty-state,
.finder-card,
.filter-panel,
.initiative-card,
.idea-form,
.packet-dialog form,
.state-panel,
.map-card,
.vote-card,
.official-card,
.stat-panel,
.live-result {
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: rgba(246, 248, 247, 0.78);
  box-shadow: none;
}

.feed-controls,
.finder-card,
.state-panel {
  background: #ffffff;
}

.feed-card,
.initiative-card,
.official-card,
.vote-card,
.source-card,
.live-result {
  background: #ffffff;
}

.source-card {
  border: 2px solid var(--ink);
}

.source-card strong,
.finder-card label,
.idea-form label,
.sort-control,
.selector-group label,
.map-search label {
  color: var(--ink);
}

.source-pill,
.feed-type,
.tag,
.filter-chip,
.district-button,
.tool-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 900;
}

.county-card,
.municipality-card,
.state-summary-card {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 900;
}

.source-pill.error,
.feed-type.initiatives,
.feed-type.initiative,
.filter-chip.active,
.district-button.active,
.tool-button.active {
  color: #ffffff;
  background: var(--coral);
}

.source-pill.empty,
.feed-type.official,
.feed-type.money {
  color: var(--ink);
  background: var(--mint);
}

.feed-type.bill {
  color: #ffffff;
  background: var(--ink);
}

.feed-marker,
.brand-mark {
  background: transparent;
}

.feed-card-link,
.empty-state a,
.state-grid a,
.packet-dialog a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 900;
}

.stat-panel {
  border-color: var(--ink);
  background: #ffffff;
}

.stat-panel div {
  border-color: var(--ink);
}

.stat-panel strong {
  color: var(--coral);
}

.map-shell {
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 20, 20, 0.04) 1px, transparent 1px),
    #ffffff;
}

.mobile-bottom-nav {
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 5px 5px 0 rgba(32, 36, 33, 0.32);
  backdrop-filter: none;
}

.mobile-bottom-nav a {
  min-height: 48px;
  color: var(--ink);
}

.mobile-bottom-nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--ink);
}

@media (min-width: 920px) {
  .feed-header,
  .map-header,
  .page-header {
    grid-template-columns: auto minmax(0, 1fr) minmax(340px, 0.44fr);
    align-items: center;
  }

  .feed-header nav,
  .map-header nav,
  .page-header nav {
    grid-column: auto;
    justify-content: flex-end;
  }

  .global-search {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 340px;
  }

  h1 {
    font-size: 72px;
  }

  h2,
  .section-heading h2,
  .panel-heading h2,
  .feed-stream-heading h2 {
    font-size: 46px;
  }
}

@media (max-width: 560px) {
  .feed-header,
  .map-header,
  .page-header {
    position: relative;
    top: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    margin-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 10px 14px;
    box-shadow: none;
  }

  .feed-header nav,
  .map-header nav,
  .page-header nav,
  .global-search {
    grid-column: 1 / -1;
  }

  .site-menu-button {
    display: inline-flex;
    justify-self: end;
  }

  .feed-header nav,
  .map-header nav,
  .page-header nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    left: 14px;
    z-index: 40;
    display: none;
    grid-template-columns: 1fr;
    gap: 6px;
    border: 2px solid var(--ink);
    border-radius: 18px;
    padding: 8px;
    background: #ffffff;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .feed-header nav a,
  .map-header nav a,
  .page-header nav a {
    justify-content: space-between;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 12px;
    font-size: 0.92rem;
  }

  .feed-header nav.is-open,
  .map-header nav.is-open,
  .page-header nav.is-open {
    display: grid;
  }

  .brand-word {
    display: inline;
    font-size: 14px;
  }

  h1 {
    font-size: 34px;
  }

  h2,
  .section-heading h2,
  .panel-heading h2,
  .feed-stream-heading h2 {
    font-size: 28px;
  }

  .global-search {
    grid-template-columns: minmax(0, 1fr);
  }

  .global-search input,
  .global-search button {
    min-height: 46px;
  }

  .mobile-bottom-nav {
    display: none !important;
  }
}
