:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --ink: #18212b;
  --muted: #66717e;
  --line: #d8dee5;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warn: #b45309;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.brand {
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
}

.global-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 520px;
  gap: 0.4rem;
}

.global-search input {
  min-height: 38px;
  padding: 0.5rem 0.7rem;
}

.global-search button {
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 1rem;
}

.messages {
  width: min(1180px, 100%);
  margin: 0.75rem auto 0;
  padding: 0 1rem;
}

.message {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.75rem 1rem;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}

.page-header.compact {
  align-items: center;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

h2 {
  font-size: 1.15rem;
}

p {
  color: var(--muted);
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.secondary {
  background: #eef7f6;
  color: var(--accent-dark);
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #b91c1c;
  border-radius: var(--radius);
  background: #b91c1c;
  color: white;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.danger-button:hover {
  background: #991b1b;
  text-decoration: none;
}

.danger-panel {
  border-color: #fecaca;
  background: #fffafa;
}

.inline {
  width: fit-content;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

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

.card,
.panel,
.table-panel,
.auth-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1rem;
}

.card-kicker {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metrics,
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.metrics div,
.metric-strip div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: #fafbfc;
}

.metrics dt,
.metric-strip small {
  color: var(--muted);
  font-size: 0.78rem;
}

.metrics dd,
.metric-strip span {
  display: block;
  margin: 0.2rem 0 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.metric-strip {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1rem;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.chart-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
}

.plain-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.plain-list li {
  margin: 0.45rem 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.responsive-table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-panel {
  width: min(520px, 100%);
  margin: 2rem auto;
}

.auth-panel.wide {
  width: min(720px, 100%);
}

.auth-panel.wide:has(.campaign-builder) {
  width: min(980px, 100%);
}

.form-stack p {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
}

.field-grid,
.builder-grid {
  display: grid;
  gap: 1rem;
}

.builder-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

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

.field-grid .full {
  grid-column: 1 / -1;
}

.builder-panel {
  display: grid;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 1rem;
}

.builder-panel h2 {
  font-size: 1rem;
}

.builder-panel label,
.field-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 700;
}

.builder-panel small,
.field-grid small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.form-stack .helptext {
  color: var(--muted);
  font-size: 0.85rem;
}

.error-summary,
.errorlist {
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fef2f2;
  color: #991b1b;
}

.error-summary {
  padding: 0.8rem 0.9rem;
}

.error-summary ul,
.errorlist {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.error-summary li,
.errorlist li {
  margin: 0.25rem 0;
}

.form-stack .errorlist {
  display: block;
  margin: 0 0 0.35rem;
  padding: 0.55rem 0.75rem 0.55rem 1.6rem;
  font-weight: 700;
}

.form-stack .disabled-field {
  opacity: 0.6;
}

.form-stack .disabled-field select,
.form-stack .disabled-field input,
.form-stack .disabled-field textarea {
  background: #eef2f7;
  cursor: not-allowed;
}

.form-stack #id_copy_ward_districts,
.library-district-picker ul,
.library-district-picker div.library-district-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.5rem;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 0.7rem;
  list-style: none;
  margin: 0;
}

.form-stack #id_copy_ward_districts label,
.library-district-picker label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-stack #id_copy_ward_districts input,
.library-district-picker input {
  width: auto;
}

.library-district-picker [hidden] {
  display: none !important;
}

.picker-empty-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  padding: 0.45rem;
}

.party-multiselect {
  min-height: 12rem;
  background: #fbfcfd;
}

.party-multiselect option {
  padding: 0.38rem 0.45rem;
  border-radius: 4px;
}

.party-multiselect option:checked {
  background: linear-gradient(0deg, var(--accent), var(--accent));
  color: white;
}

.search-page-form {
  margin-bottom: 1rem;
}

.search-large {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.7rem;
  align-items: end;
}

.report-filters label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 700;
}

.turf-filters {
  grid-template-columns: repeat(2, minmax(0, 180px)) auto auto;
  margin-bottom: 1rem;
}

.search-results {
  align-items: start;
}

.result-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.result-row {
  display: grid;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 0.8rem;
  color: var(--ink);
}

.result-row:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.result-row span,
.result-row small {
  color: var(--muted);
}

.message-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.message-row {
  display: grid;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
}

.message-row.unread {
  border-left: 4px solid var(--accent);
  background: #f0fdfa;
}

.message-row:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.message-row span,
.message-row small {
  color: var(--muted);
}

.message-body {
  font-size: 1rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.72rem 0.8rem;
  font: inherit;
}

.map-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 90px);
  gap: 1rem;
}

.map-sidebar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1rem;
}

.campaign-map {
  position: relative;
  z-index: 0;
  min-height: calc(100vh - 90px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.embedded-map {
  position: relative;
  z-index: 0;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0;
}

.address-map {
  min-height: 280px;
  margin: 0;
}

.map-summary {
  margin-top: 1rem;
  color: var(--muted);
}

.locate-control {
  min-width: 96px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  padding: 0.35rem 0.55rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.locate-control.active {
  border-color: #2563eb;
  color: #1d4ed8;
}

.turf-recommendation {
  display: grid;
  gap: 0.18rem;
  max-width: min(300px, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.turf-recommendation strong {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
}

.turf-recommendation span {
  font-weight: 800;
}

.turf-recommendation small {
  color: var(--muted);
}

.recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
  font-weight: 750;
}

.stop-list {
  display: grid;
  gap: 0.5rem;
}

.stop-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
  padding: 0.55rem 0;
}

.stop-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.stop-legend strong {
  color: var(--ink);
}

.pass-reset-note,
.form-note {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.stop-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.75rem;
  color: var(--ink);
}

.sequence {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e4f2f0;
  color: var(--accent-dark);
  font-weight: 800;
}

.stop-row.not-started .sequence,
.legend-swatch.not-started {
  background: #eef2f7;
  color: #64748b;
}

.stop-row.worked .sequence,
.legend-swatch.worked {
  background: #dcfce7;
  color: #166534;
}

.stop-row.followup .sequence,
.legend-swatch.followup {
  background: #fef3c7;
  color: #92400e;
}

.legend-swatch {
  width: 28px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  flex: 0 0 auto;
}

.stop-row small,
.history-item small {
  display: block;
  color: var(--muted);
}

.stop-pass-state {
  font-weight: 700;
}

.preline {
  white-space: pre-line;
}

.address-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.address-facts div {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}

.address-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.address-facts dd {
  margin: 0.2rem 0 0;
  font-weight: 700;
}

.compact-history {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 0.8rem;
}

.compact-history h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.compact-history p,
.other-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.history-item {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--warn);
  padding: 0.25rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.pill.neutral {
  background: #eef2f7;
  color: var(--muted);
}

.nav-pair,
.bottom-nav,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.bottom-nav {
  justify-content: space-between;
  margin: 1rem 0 0;
}

.households-section {
  margin: 1rem 0;
}

.household-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.household-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1rem;
}

.household-disclosure summary {
  display: block;
  margin: -1rem;
  padding: 1rem 3rem 1rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.household-disclosure summary::-webkit-details-marker {
  display: none;
}

.household-disclosure summary::after {
  content: "+";
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-dark);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.household-disclosure[open] summary {
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.household-disclosure[open] summary::after {
  content: "-";
}

.household-disclosure .person-link-list {
  margin-top: 1rem;
}

.household-actions {
  margin-top: 1rem;
}

.household-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.household-head h3 {
  margin: 0;
  font-size: 1rem;
}

.household-head p {
  margin: 0.25rem 0 0;
}

.voter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.person-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.person-link-list li {
  margin: 0;
}

.person-card {
  display: grid;
  gap: 0.55rem;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 0.7rem 0.8rem;
}

.person-link-list .person-link {
  display: grid;
  gap: 0.15rem;
  color: var(--ink);
}

.person-card:hover {
  border-color: var(--accent);
}

.person-link-list .person-link:hover {
  text-decoration: none;
}

.person-link-list span,
.person-link-list em {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.quick-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--ink);
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.quick-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.voter-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 0.9rem;
  scroll-margin-top: 76px;
}

.voter-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.voter-card h3 {
  margin: 0;
  font-size: 1rem;
}

.voter-card p {
  margin: 0.25rem 0 0.75rem;
}

.latest-note {
  border-left: 3px solid var(--accent);
  padding-left: 0.7rem;
}

.mini-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.mini-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink);
  font-size: 0.9rem;
}

.mini-form .full {
  grid-column: 1 / -1;
}

.checkbox-line {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 0.5rem !important;
}

.checkbox-line input {
  width: auto;
}

@media (max-width: 760px) {
  .page {
    padding: 0.75rem;
  }

  .page-header,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
  }

  .global-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .global-search button {
    padding-inline: 0.6rem;
  }

  .search-large {
    grid-template-columns: 1fr;
  }

  .report-filters {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .split,
  .builder-grid,
  .field-grid,
  .campaign-grid,
  .address-facts {
    grid-template-columns: 1fr;
  }

  .household-head {
    align-items: stretch;
    flex-direction: column;
  }

  .map-shell {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .map-sidebar {
    order: 2;
  }

  .campaign-map {
    min-height: 62vh;
  }

  .topnav span {
    display: none;
  }

  .mini-form {
    grid-template-columns: 1fr;
  }
}

/* FieldCanvas dark visual system */
:root {
  color-scheme: dark;
  --bg: #101311;
  --panel: #181c1a;
  --panel-2: #1f2522;
  --ink: #f4f1e8;
  --muted: #a7b0a9;
  --line: #303833;
  --accent: #14b8a6;
  --accent-dark: #7dd3c7;
  --warn: #f4c95d;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(244, 201, 93, 0.09), transparent 30rem),
    var(--bg);
}

a {
  color: var(--accent-dark);
}

.topbar {
  min-height: 64px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(16, 19, 17, 0.86);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(20, 184, 166, 0.75);
}

.topnav a,
.link-button {
  color: #d9e5df;
}

.topnav a:hover,
.link-button:hover {
  color: white;
}

.page {
  padding-top: 1.35rem;
}

.page-header {
  margin: 1rem 0 1.1rem;
}

.page-header h1 {
  color: var(--ink);
}

p {
  color: var(--muted);
}

.card,
.panel,
.table-panel,
.auth-panel,
.empty-state,
.map-sidebar,
.household-card,
.voter-card,
.builder-panel {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(24, 28, 26, 0.92);
  box-shadow: var(--shadow);
}

.card,
.panel,
.table-panel,
.auth-panel,
.empty-state {
  padding: 1.1rem;
}

.card h2 a,
.result-row,
.message-row,
.person-link-list .person-link,
.stop-row {
  color: var(--ink);
}

.metrics div,
.metric-strip div,
.result-row,
.message-row,
.person-card,
.quick-button,
.builder-panel,
.form-stack #id_copy_ward_districts,
.library-district-picker ul,
.library-district-picker div.library-district-options {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(31, 37, 34, 0.9);
}

.metrics dt,
.metric-strip small,
.card-kicker,
th,
.result-row span,
.result-row small,
.message-row span,
.message-row small,
.stop-row small,
.history-item small,
.address-facts dt,
.form-stack .helptext,
.builder-panel small,
.field-grid small,
.pass-reset-note,
.form-note,
.compact-history p,
.other-note {
  color: var(--muted);
}

.metrics dd,
.metric-strip span {
  color: #fffaf0;
}

.primary {
  border-color: rgba(20, 184, 166, 0.6);
  background: #14b8a6;
  color: #08110f;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.18);
}

.primary:hover {
  background: #2dd4bf;
  color: #06100d;
}

.secondary {
  border-color: rgba(125, 211, 199, 0.14);
  background: rgba(20, 184, 166, 0.11);
  color: #baf3eb;
}

.secondary:hover {
  border-color: rgba(125, 211, 199, 0.32);
  background: rgba(20, 184, 166, 0.18);
  text-decoration: none;
}

.danger-button {
  border-color: rgba(239, 68, 68, 0.48);
  background: #b91c1c;
  color: white;
}

input,
select,
textarea {
  border-color: rgba(255, 255, 255, 0.1);
  background: #101411;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #728079;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(20, 184, 166, 0.78);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
  outline: 0;
}

.global-search input {
  background: rgba(255, 255, 255, 0.06);
}

.global-search button {
  border-color: rgba(20, 184, 166, 0.7);
  background: rgba(20, 184, 166, 0.18);
  color: #d9fffa;
}

table {
  overflow: hidden;
}

th,
td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.message {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(24, 28, 26, 0.98);
}

.message-row.unread {
  background: rgba(20, 184, 166, 0.12);
}

.error-summary,
.errorlist {
  border-color: rgba(239, 68, 68, 0.36);
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
}

.map-sidebar,
.campaign-map,
.embedded-map {
  border-color: rgba(255, 255, 255, 0.1);
}

.locate-control,
.turf-recommendation {
  background: rgba(17, 22, 19, 0.95);
  color: var(--ink);
}

.sequence {
  background: rgba(20, 184, 166, 0.18);
  color: #baf3eb;
}

.stop-row,
.household-card {
  background: rgba(24, 28, 26, 0.86);
}

.stop-row.not-started .sequence,
.legend-swatch.not-started {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.stop-row.worked .sequence,
.legend-swatch.worked {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

.stop-row.followup .sequence,
.legend-swatch.followup {
  background: rgba(244, 201, 93, 0.2);
  color: #fde68a;
}

.pill {
  background: rgba(244, 201, 93, 0.16);
  color: #fde68a;
}

.pill.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.library-district-picker label,
.form-stack #id_copy_ward_districts label {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(16, 20, 17, 0.86);
}

.public-landing {
  min-height: 100vh;
  background: #101311;
}

.public-landing .topbar {
  position: fixed;
  left: 0;
  right: 0;
}

.public-landing .page {
  width: 100%;
  padding: 0;
}

.landing-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100svh - 32px);
  overflow: hidden;
  padding: 7rem max(1.2rem, calc((100vw - 1180px) / 2)) 5rem;
}

.landing-map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 19, 17, 0.92), rgba(16, 19, 17, 0.68) 42%, rgba(16, 19, 17, 0.22)),
    linear-gradient(0deg, rgba(16, 19, 17, 0.82), transparent 42%);
  pointer-events: none;
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
}

.landing-kicker {
  margin: 0 0 0.9rem;
  color: #9be7dc;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-hero h1 {
  font-size: clamp(3.25rem, 11vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.landing-copy {
  width: min(650px, 100%);
  margin: 1.25rem 0 0;
  color: #d6ddd8;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
}

.landing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.landing-actions span {
  color: var(--muted);
}

.landing-signal {
  position: absolute;
  right: max(1rem, calc((100vw - 1180px) / 2));
  bottom: 4.5rem;
  z-index: 1;
  display: grid;
  gap: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(24, 28, 26, 0.68);
  padding: 1rem 1.15rem;
  backdrop-filter: blur(12px);
}

.landing-signal span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.landing-signal strong {
  color: #f7f2dc;
  font-size: 1.25rem;
}

.landing-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  min-height: 22vh;
  background: rgba(255, 255, 255, 0.08);
}

.landing-band div {
  background: #151917;
  padding: 1.4rem clamp(1.1rem, 4vw, 2.2rem);
}

.landing-band span {
  color: var(--accent-dark);
  font-weight: 800;
}

.landing-band strong {
  display: block;
  margin-top: 0.4rem;
  color: var(--ink);
  font-size: 1.1rem;
}

.landing-band p {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .landing-hero {
    min-height: calc(100svh - 18px);
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .landing-hero::after {
    background: linear-gradient(0deg, rgba(16, 19, 17, 0.88), rgba(16, 19, 17, 0.42));
  }

  .landing-signal {
    position: relative;
    right: auto;
    bottom: auto;
    width: fit-content;
    margin-top: 2rem;
  }

  .landing-band {
    grid-template-columns: 1fr;
  }
}
