:root {
  --ink: #17201e;
  --muted: #64706c;
  --paper: #ffffff;
  --canvas: #f1f3ef;
  --line: #d9ded8;
  --line-strong: #bcc5bd;
  --teal: #087e73;
  --teal-soft: #e6f3f0;
  --red: #c44132;
  --red-soft: #f9ebe8;
  --gold: #b56d00;
  --gold-soft: #fff3d8;
  --blue: #275da8;
  --blue-soft: #eaf0fa;
  --shadow: 0 18px 55px rgba(25, 42, 37, 0.16);
}

.portrait-link {
  display: block;
  width: fit-content;
  border-radius: 4px;
}

.portrait-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.portrait-edit-button {
  position: relative;
  display: block;
  width: fit-content;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.portrait-edit-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.portrait-edit-button:hover .avatar {
  border-color: var(--teal);
}

.portrait-edit-icon {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #fff;
  background: var(--teal);
  border: 2px solid #fff;
  border-radius: 50%;
}

.portrait-edit-icon svg {
  width: 13px;
  height: 13px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(23, 32, 30, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 30, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 126, 115, 0.28);
  outline-offset: 2px;
}

a {
  color: var(--teal);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 58px);
  color: #fff;
  background: #17201e;
  border-bottom: 4px solid var(--red);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  color: #fff;
  background: var(--teal);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 500;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 17px;
  font-weight: 600;
}

.brand small {
  margin-top: 2px;
  color: #aeb9b4;
  font-size: 12px;
}

.workspace-switch {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.17);
}

.workspace-switch a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: #bfc9c4;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.workspace-switch a.is-active {
  color: var(--ink);
  background: #fff;
}

.header-stats {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
  margin: 0;
}

.header-stats div {
  min-width: 70px;
}

.header-stats dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 500;
}

.header-stats dd {
  margin: 2px 0 0;
  color: #aeb9b4;
  font-size: 11px;
  text-transform: uppercase;
}

.topbar-actions,
.status-link {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: clamp(18px, 3vw, 38px);
}

.account-button {
  min-height: 40px;
  margin-left: 2px;
  padding-left: clamp(14px, 2vw, 24px);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.status-link {
  gap: 8px;
  min-height: 40px;
  padding: 0;
  color: #dbe5e0;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.status-link svg {
  width: 18px;
  height: 18px;
  color: #72c5b8;
}

.admin-menu {
  position: relative;
}

.admin-menu[hidden] {
  display: none;
}

.admin-menu summary {
  cursor: pointer;
  list-style: none;
}

.admin-menu summary::-webkit-details-marker {
  display: none;
}

.admin-menu-chevron {
  width: 14px !important;
  height: 14px !important;
  margin-left: -3px;
  transition: transform 140ms ease;
}

.admin-menu[open] .admin-menu-chevron {
  transform: rotate(180deg);
}

.admin-menu-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 18px);
  right: 0;
  width: 280px;
  padding: 7px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.admin-menu-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: var(--paper);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.admin-menu-panel a {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  color: var(--ink);
  border-radius: 4px;
  text-decoration: none;
}

.admin-menu-panel a:hover,
.admin-menu-panel a:focus-visible {
  background: var(--teal-soft);
  outline: none;
}

.admin-menu-panel a > svg {
  width: 18px;
  height: 18px;
  color: var(--teal);
}

.admin-menu-panel a span {
  display: grid;
  gap: 2px;
}

.admin-menu-panel a strong {
  font-size: 13px;
}

.admin-menu-panel a small {
  color: var(--muted);
  font-size: 11px;
}

.status-view {
  min-height: calc(100vh - 76px);
}

.legislation-view {
  width: min(1240px, calc(100% - 36px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 34px 0 64px;
}

.legislation-heading,
.legislation-toolbar,
.legislation-bill-header,
.legislation-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legislation-heading {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
}

.legislation-heading p,
.legislation-heading h1,
.legislation-toolbar h2,
.legislation-bill-header p,
.legislation-bill-header h2 {
  margin: 0;
}

.legislation-heading p,
.legislation-section-label,
.legislation-bill-header p {
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.legislation-heading h1 {
  margin-top: 4px;
  font-size: 31px;
  letter-spacing: 0;
}

.legislation-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 7px;
}

.legislation-title-row h2 {
  min-width: 0;
  margin-top: 0;
}

.legislation-title-row .icon-button {
  flex: 0 0 auto;
  margin-top: 3px;
}

.official-source-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.official-source-link svg {
  width: 16px;
  height: 16px;
}

.legislation-index {
  padding-top: 28px;
}

.legislation-tabs {
  display: flex;
  gap: 24px;
  min-height: 48px;
  align-items: end;
  border-bottom: 1px solid var(--line-strong);
}

.legislation-tabs a {
  padding: 15px 2px 11px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.legislation-tabs a.is-active {
  color: var(--ink);
  border-bottom-color: var(--red);
}

.legislation-committee-filters {
  grid-template-columns: minmax(180px, .7fr) minmax(180px, .7fr) auto;
  justify-content: start;
}

.legislation-toolbar {
  align-items: flex-end;
  margin-bottom: 18px;
}

.legislation-toolbar h2 {
  margin-top: 3px;
  font-size: 21px;
  letter-spacing: 0;
}

.legislation-freshness,
.legislation-detail-freshness {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  line-height: 1.6;
}

.legislation-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(130px, .65fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.legislation-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legislation-filters label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.legislation-filters label > span:not(.sr-only) {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.legislation-filters input,
.legislation-filters select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.legislation-search {
  position: relative;
}

.legislation-search > svg {
  position: absolute;
  left: 11px;
  bottom: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.legislation-search input {
  padding-left: 36px;
}

.legislation-results {
  min-height: 170px;
  margin-top: 18px;
}

.legislation-bill-list {
  background: var(--paper);
  border: 1px solid var(--line);
}

.legislation-bill-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(135px, .55fr) minmax(260px, 1.7fr) minmax(170px, .8fr) 22px;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.legislation-bill-row:last-child {
  border-bottom: 0;
}

.legislation-bill-row:hover,
.legislation-bill-row:focus-visible {
  background: #f7faf7;
  outline: 0;
  box-shadow: inset 4px 0 var(--teal);
}

.legislation-bill-number {
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.legislation-bill-main,
.legislation-bill-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.legislation-bill-main strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.legislation-bill-main small,
.legislation-bill-meta {
  color: var(--muted);
  font-size: 11px;
}

.legislation-bill-row > svg {
  width: 18px;
  color: var(--teal);
}

.legislative-member-metrics {
  display: grid;
  gap: 20px;
}

.legislative-metric-session > h4 {
  margin: 0;
  padding-bottom: 10px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.legislative-metric-row {
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}

.legislative-metric-row > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.legislative-metric-row > header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.legislative-metric-row > header strong {
  font-size: 14px;
}

.legislative-metric-row > header span,
.legislative-metric-view small {
  color: var(--muted);
  font-size: 11px;
}

.legislative-metric-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: #17645d !important;
  background: #e5f3ef;
  border: 1px solid #b9dcd4;
  border-radius: 3px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px !important;
  font-weight: 600;
  text-transform: uppercase;
}

.legislative-metric-status.is-suppressed {
  color: #76520b !important;
  background: #fff5d9;
  border-color: #e8d49a;
}

.legislative-metric-views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legislative-metric-view {
  min-width: 0;
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding-right: 20px;
}

.legislative-metric-view + .legislative-metric-view {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.legislative-metric-view > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.legislative-metric-view > strong {
  margin: 2px 0 3px;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 22px;
  line-height: 1;
}

.legislative-metric-view.is-suppressed > strong {
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
}

@media (max-width: 640px) {
  .legislative-metric-row > header {
    align-items: start;
  }

  .legislative-metric-views {
    grid-template-columns: minmax(0, 1fr);
  }

  .legislative-metric-view {
    min-height: 0;
    padding: 0 0 14px;
  }

  .legislative-metric-view + .legislative-metric-view {
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

.legislation-committee-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(260px, 1.7fr) 80px 80px 22px;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.legislation-committee-row:last-child {
  border-bottom: 0;
}

.legislation-committee-row:hover,
.legislation-committee-row:focus-visible {
  background: #f7faf7;
  outline: 0;
  box-shadow: inset 4px 0 var(--teal);
}

.legislation-committee-row > svg {
  width: 18px;
  color: var(--teal);
}

.legislation-member-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(130px, .6fr) minmax(260px, 1.7fr) 80px 80px 22px;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.legislation-member-row:last-child {
  border-bottom: 0;
}

.legislation-member-row:hover,
.legislation-member-row:focus-visible {
  background: #f7faf7;
  outline: 0;
  box-shadow: inset 4px 0 var(--teal);
}

.legislation-member-row > svg {
  width: 18px;
  color: var(--teal);
}

.legislation-tracking-filters {
  grid-template-columns: repeat(2, minmax(180px, 280px)) auto;
  justify-content: start;
}

.tracking-updates {
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--red);
}

.tracking-updates > header {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.tracking-updates > header h3 {
  margin: 3px 0 0;
  font-size: 18px;
  letter-spacing: 0;
}

.tracking-updates > header .text-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
}

.tracking-updates > header .text-button svg {
  width: 15px;
}

.tracking-update-list {
  display: grid;
}

.tracking-update {
  min-height: 66px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 18px;
  gap: 14px;
  align-items: center;
  padding: 11px 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.tracking-update:last-child {
  border-bottom: 0;
}

.tracking-update:hover,
.tracking-update:focus-visible {
  background: #f7faf7;
  outline: 0;
  box-shadow: inset 4px 0 var(--teal);
}

.tracking-update-marker {
  width: 7px;
  height: 7px;
  background: var(--line-strong);
  border-radius: 50%;
}

.tracking-update.is-unread .tracking-update-marker {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.tracking-update > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tracking-update small {
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.tracking-update strong,
.tracking-update span span {
  overflow-wrap: anywhere;
}

.tracking-update strong {
  font-size: 13px;
}

.tracking-update span span,
.tracking-update time {
  color: var(--muted);
  font-size: 10px;
}

.tracking-update time {
  white-space: nowrap;
}

.tracking-update > svg {
  width: 17px;
  color: var(--teal);
}

.tracking-list {
  background: var(--paper);
  border: 1px solid var(--line);
}

.tracking-row {
  position: relative;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.tracking-row:last-child {
  border-bottom: 0;
}

.tracking-row.is-paused {
  background: #faf9f6;
}

.tracking-row-link {
  min-height: 88px;
  display: grid;
  grid-template-columns: 38px minmax(240px, 1.5fr) minmax(150px, .7fr) minmax(180px, .85fr) 18px;
  gap: 16px;
  align-items: center;
  padding: 14px 62px 14px 18px;
  color: var(--ink);
  text-decoration: none;
}

.tracking-row-link:hover,
.tracking-row-link:focus-visible {
  background: #f7faf7;
  outline: 0;
  box-shadow: inset 4px 0 var(--teal);
}

.tracking-row-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 3px;
}

.tracking-row-icon svg {
  width: 17px;
  height: 17px;
}

.tracking-row-main,
.tracking-row-state {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tracking-row-main > small {
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.tracking-row-main > strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.tracking-row-main > span,
.tracking-row-state small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.tracking-row-metrics {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}

.tracking-row-metrics > span {
  min-width: 54px;
  display: grid;
  gap: 2px;
  text-align: right;
}

.tracking-row-metrics strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 15px;
}

.tracking-row-metrics small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.tracking-row-state {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.tracking-row-state strong {
  width: fit-content;
  color: #08665e;
  font-size: 10px;
  text-transform: uppercase;
}

.tracking-row.is-paused .tracking-row-state strong {
  color: #775000;
}

.tracking-row.has-unread .tracking-row-state strong {
  color: var(--red);
}

.tracking-row-link > svg {
  width: 18px;
  color: var(--teal);
}

.tracking-row > .icon-button {
  position: absolute;
  right: 13px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
}

.tracking-row > .icon-button:hover {
  color: var(--red);
}

.legislation-member-district {
  display: grid;
  gap: 3px;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
}

.legislation-member-district strong {
  color: var(--red);
  font-size: 11px;
}

.legislation-member-district small {
  color: var(--muted);
  font-size: 10px;
}

.legislation-committee-count {
  display: grid;
  gap: 2px;
  text-align: right;
}

.legislation-committee-count strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 17px;
}

.legislation-committee-count small,
.legislation-member-list small,
.legislation-meeting-list small {
  color: var(--muted);
  font-size: 10px;
}

.legislation-outcome {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #775000;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  font-size: 10px;
  font-weight: 600;
}

.outcome-vetoed {
  color: #8a2f24;
  background: var(--red-soft);
  border-left-color: var(--red);
}

.outcome-signed,
.outcome-enacted-without-signature,
.outcome-veto-overridden {
  color: #08665e;
  background: var(--teal-soft);
  border-left-color: var(--teal);
}

.legislation-detail-nav {
  min-height: 46px;
  padding-bottom: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.legislation-detail-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.legislation-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.legislation-member-vote {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.legislation-member-vote:last-child {
  border-bottom: 0;
}

.legislation-member-vote > span:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.legislation-member-vote strong,
.legislation-member-vote a {
  overflow-wrap: anywhere;
}

.legislation-member-vote small {
  color: var(--muted);
  font-size: 10px;
}

.legislation-detail-nav svg {
  width: 17px;
}

.legislation-bill-detail {
  padding-top: 30px;
}

.legislation-bill-header {
  align-items: flex-start;
  padding-bottom: 30px;
}

.legislation-bill-header > div {
  min-width: 0;
}

.legislation-bill-header h2 {
  max-width: 820px;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
}

.legislation-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.legislation-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
  gap: 36px;
  align-items: start;
}

.legislation-detail-grid aside {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.legislation-detail-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legislation-detail-grid > div > .legislation-detail-section:first-child,
.legislation-detail-grid aside > .legislation-detail-section:first-child {
  margin-top: 0;
}

.legislation-detail-section > h3 {
  margin: 0 0 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.legislation-sponsor-list,
.legislation-document-list,
.legislation-member-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.legislation-member-list > a,
.legislation-meeting-list > a {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
}

.legislation-member-list > a {
  grid-template-columns: minmax(0, 1fr) 18px;
}

.legislation-member-list span,
.legislation-meeting-list span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.legislation-member-list svg,
.legislation-meeting-list svg {
  width: 16px;
  color: var(--teal);
}

.legislation-meeting-list {
  display: grid;
  gap: 8px;
}

.legislation-meeting-list > a {
  grid-template-columns: 110px minmax(0, 1fr) 18px;
}

.legislation-meeting-list time {
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.legislation-sponsor-list > div,
.legislation-sponsor-list > a,
.legislation-document-list > a {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
}

.legislation-sponsor-list strong,
.legislation-sponsor-list small {
  grid-column: 1;
}

.legislation-sponsor-list small,
.legislation-document-list small {
  color: var(--muted);
  font-size: 11px;
}

.legislation-sponsor-list svg,
.legislation-document-list > a > svg:last-child {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 15px;
  color: var(--teal);
}

.legislation-document-list > a {
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
}

.legislation-document-list > a > svg:first-child {
  width: 18px;
  color: var(--red);
}

.legislation-document-list > a > span {
  grid-column: 2;
  display: grid;
  gap: 3px;
}

.legislation-document-list > a > svg:last-child {
  grid-column: 3;
  grid-row: 1;
}

.legislation-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legislation-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 18px;
  padding: 0 0 20px 20px;
  border-left: 1px solid var(--line-strong);
}

.legislation-timeline li::before {
  position: absolute;
  top: 3px;
  left: -5px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--paper);
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.legislation-timeline time {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.legislation-timeline div {
  display: grid;
  gap: 4px;
}

.legislation-timeline strong {
  font-size: 13px;
  font-weight: 500;
}

.legislation-timeline small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.legislation-empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.legislation-vote-list {
  background: var(--paper);
  border: 1px solid var(--line);
}

.legislation-vote-list details {
  border-bottom: 1px solid var(--line);
}

.legislation-vote-list details:last-child {
  border-bottom: 0;
}

.legislation-vote-list summary {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.legislation-vote-list summary::-webkit-details-marker {
  display: none;
}

.legislation-vote-list summary > span:first-child {
  display: grid;
  gap: 4px;
}

.legislation-vote-list summary small {
  color: var(--muted);
  font-size: 10px;
}

.legislation-vote-list summary > svg {
  width: 17px;
  color: var(--teal);
}

.vote-result {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.result-pass {
  color: var(--teal);
}

.result-fail {
  color: var(--red);
}

.vote-breakdown {
  padding: 16px;
  background: #f7f9f6;
  border-top: 1px solid var(--line);
}

.vote-position-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.vote-position-groups h4,
.vote-position-groups p {
  margin: 0;
}

.vote-position-groups h4 {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.vote-position-groups p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.55;
}

.roll-call-position-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-top: 8px;
}

.roll-call-position-groups section {
  min-width: 0;
}

.roll-call-position-groups h3 {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 12px 0;
  border-bottom: 2px solid var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.roll-call-position-groups h3 span {
  color: var(--muted);
}

.roll-call-position-list > a,
.roll-call-position-list > div {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.roll-call-position-list > a:hover strong {
  color: var(--teal);
}

.roll-call-position-list span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.roll-call-position-list strong,
.roll-call-position-list small {
  overflow-wrap: anywhere;
}

.roll-call-position-list small {
  color: var(--muted);
  font-size: 10px;
}

.roll-call-position-list svg {
  width: 15px;
  flex: 0 0 auto;
  color: var(--teal);
}

.status-panel {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto 48px;
  padding: 28px 0;
}

.status-heading,
.status-summary,
.status-table-header,
.status-table-row {
  display: grid;
}

.status-heading {
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.status-heading p,
.status-heading h1 {
  margin: 0;
}

.status-heading p {
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-heading h1 {
  margin-top: 4px;
  font-size: 30px;
}

.status-heading > span,
.status-generated {
  color: var(--muted);
  font-size: 12px;
}

.import-freshness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 0;
}

.import-freshness-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 118px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
}

.import-freshness-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
}

.import-freshness-icon svg {
  width: 21px;
  height: 21px;
}

.import-freshness-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.import-freshness-card small,
.import-freshness-card span,
.status-section-heading p {
  color: var(--muted);
  font-size: 12px;
}

.import-freshness-card small,
.status-section-heading p {
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.import-freshness-card strong {
  font-size: 17px;
}

.status-section-heading {
  padding: 6px 0 16px;
}

.status-section-heading p,
.status-section-heading h2 {
  margin: 0;
}

.status-section-heading h2 {
  margin-top: 3px;
  font-size: 21px;
}

.status-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line-strong);
}

.status-summary-item {
  min-height: 112px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-content: center;
  gap: 2px 10px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.status-summary-item:last-child {
  border-right: 0;
}

.status-summary-item svg {
  width: 22px;
  height: 22px;
  grid-row: 1 / 3;
  color: var(--muted);
}

.status-summary-item strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 22px;
}

.status-summary-item span {
  color: var(--muted);
  font-size: 12px;
}

.status-table {
  margin-top: 28px;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line-strong);
}

.status-table-header,
.status-table-row {
  min-width: 900px;
  grid-template-columns: 150px minmax(260px, 1fr) 130px 90px 110px 70px;
  align-items: center;
  gap: 14px;
}

.status-table-header {
  min-height: 42px;
  padding: 8px 16px;
  color: var(--muted);
  background: #e8ebe6;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-table-row {
  min-height: 70px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.status-table-row:last-child {
  border-bottom: 0;
}

.status-table-row > span {
  min-width: 0;
}

.status-table-row strong,
.status-table-row small {
  display: block;
}

.status-table-row small {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.status-pill svg {
  width: 16px;
  height: 16px;
}

.status-imported_results { color: var(--teal); }
.status-partial_results { color: var(--gold); }
.status-filing_only { color: var(--blue); }
.status-discovered_not_imported { color: var(--gold); }
.status-unsupported_format,
.status-missing_source { color: var(--red); }

.numeric-cell {
  font-family: "IBM Plex Mono", monospace;
}

.status-generated {
  margin: 12px 0 0;
  text-align: right;
}

.conflict-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.conflict-list {
  margin-top: 28px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.conflict-organization + .conflict-organization {
  border-top: 3px solid var(--line-strong);
}

.conflict-organization > header,
.conflict-issue-heading,
.conflict-term-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.conflict-organization > header {
  padding: 18px 20px;
  background: #e8ebe6;
  border-bottom: 1px solid var(--line-strong);
}

.conflict-organization header p,
.conflict-organization header h2 {
  margin: 0;
}

.conflict-organization header p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.conflict-organization header h2 {
  margin-top: 3px;
  font-size: 18px;
}

.conflict-organization header a,
.conflict-term-row a {
  color: inherit;
}

.conflict-organization > header > span {
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.conflict-issue {
  padding: 18px 20px;
}

.conflict-issue + .conflict-issue {
  border-top: 1px solid var(--line-strong);
}

.conflict-issue-heading strong,
.conflict-issue-heading span,
.conflict-term-row strong,
.conflict-term-row small {
  display: block;
}

.conflict-issue-heading span,
.conflict-term-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.conflict-terms {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.conflict-term-row {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr) 34px;
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.conflict-term-row > span {
  min-width: 0;
}

.conflict-empty {
  margin-top: 28px;
}

.report-list {
  margin-top: 28px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px auto;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 14px 16px;
}

.report-row + .report-row {
  border-top: 1px solid var(--line-strong);
}

.report-page-link {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.report-page-link:hover strong {
  text-decoration: underline;
}

.report-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.report-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-meta time {
  flex: none;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.report-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.report-submitter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.report-submitter svg {
  width: 14px;
  height: 14px;
  color: var(--teal);
}

.workspace {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 44px) 56px;
}

.querybar {
  display: grid;
  grid-template-columns: auto minmax(280px, 720px);
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  padding: 4px;
  background: #dde2dc;
  border: 1px solid #cdd4cd;
  border-radius: 6px;
}

.mode-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  color: #59635f;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-weight: 600;
}

.mode-button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 32, 30, 0.12);
}

.mode-button svg,
.icon-button svg,
.search-field > svg,
.privacy-note svg,
.empty-state svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.search-field {
  min-height: 50px;
  display: grid;
  grid-template-columns: 24px 1fr 36px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 16px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 5px 20px rgba(23, 32, 30, 0.05);
}

.search-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 126, 115, 0.12);
}

.search-field > svg {
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-field input::placeholder {
  color: #8a9590;
}

.search-field input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
}

.icon-button:hover:not(:disabled) {
  color: var(--ink);
  background: #edf0ed;
  border-color: var(--line);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.alert-toggle.is-active {
  color: #8a5700;
  background: var(--gold-soft);
  border-color: #e2b95f;
}

.alert-toggle.is-active svg {
  fill: #f2b84b;
  stroke: #8a5700;
}

.alert-toggle.is-active:hover:not(:disabled) {
  color: #714700;
  background: #ffe7ad;
  border-color: #cf9a2e;
}

.compact-button {
  width: 30px;
  height: 30px;
}

.command-button,
.secondary-button,
.danger-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 600;
}

.command-button {
  color: #fff;
  background: var(--teal);
  border: 1px solid var(--teal);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.danger-button {
  color: var(--red);
  background: #fff;
  border: 1px solid var(--red);
}

.command-button svg,
.secondary-button svg,
.danger-button svg {
  width: 17px;
  height: 17px;
}

.editor-dialog,
.app-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.editor-dialog::backdrop,
.app-dialog::backdrop {
  background: rgba(23, 32, 30, 0.58);
}

.app-dialog-panel {
  display: grid;
  max-height: calc(100vh - 42px);
  overflow-y: auto;
}

.app-dialog-panel header {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.app-dialog-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
}

.app-dialog-icon svg {
  width: 19px;
  height: 19px;
}

.app-dialog-panel header p,
.app-dialog-panel header h2,
.app-dialog-body p {
  margin: 0;
}

.app-dialog-panel header p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-dialog-panel header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.app-dialog-body {
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.app-dialog-panel footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: var(--canvas);
  border-top: 1px solid var(--line);
}

.editor-form {
  max-height: calc(100vh - 42px);
  overflow-y: auto;
}

.editor-form header,
.editor-form footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.editor-form header {
  border-bottom: 1px solid var(--line);
}

.editor-footer-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.editor-form header p,
.editor-form header h2 {
  margin: 0;
}

.editor-form header p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.editor-form header h2 {
  margin-top: 2px;
  font-size: 20px;
}

.editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.editor-context {
  grid-column: 1 / -1;
  margin: 0;
  padding-bottom: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}

.auth-options {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.auth-options button {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.operation-warning,
.operation-record-group {
  grid-column: 1 / -1;
}

.operation-warning {
  margin: 0;
  padding: 11px 12px;
  color: #604d20;
  background: #fff8df;
  border: 1px solid #e6d28d;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.operation-record-group {
  display: grid;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.operation-record-group legend {
  width: 100%;
  padding: 9px 11px;
  color: var(--muted);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.record-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 11px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.record-choice:last-child {
  border-bottom: 0;
}

.record-choice:hover {
  background: var(--canvas);
}

.record-choice input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.record-choice > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.record-choice strong,
.record-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-choice strong {
  color: var(--ink);
  font-size: 12px;
}

.record-choice small {
  color: var(--muted);
  font-size: 11px;
}

.appointment-person-mode,
.appointment-person-fields {
  grid-column: 1 / -1;
}

.appointment-person-mode {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.appointment-person-mode legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.segmented-control label {
  position: relative;
  display: block;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 3px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.segmented-control input:checked + span {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(23, 32, 30, 0.08);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.appointment-person-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.appointment-person-results {
  display: grid;
  max-height: 228px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.appointment-person-results:empty {
  display: none;
}

.appointment-person-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.appointment-person-result:last-child {
  border-bottom: 0;
}

.appointment-person-result:hover,
.appointment-person-result:focus-visible {
  background: var(--canvas);
}

.appointment-person-result .avatar {
  width: 38px;
  height: 38px;
}

.appointment-person-result > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.appointment-person-result strong,
.appointment-person-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-person-result small,
.appointment-person-empty {
  color: var(--muted);
  font-size: 11px;
}

.appointment-person-empty {
  margin: 0;
  padding: 12px;
}

.appointment-person-selected {
  margin: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
}

.editor-fields label:not(.check-control) {
  display: grid;
  gap: 6px;
}

.editor-field-wide {
  grid-column: 1 / -1;
}

.editor-fields label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.editor-fields input,
.editor-fields select,
.editor-fields textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.editor-fields textarea {
  resize: vertical;
}

.report-confirmation {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 38px 28px;
  text-align: center;
}

.report-confirmation > svg {
  width: 42px;
  height: 42px;
  color: var(--teal);
}

.report-confirmation h2,
.report-confirmation p {
  margin: 0;
}

.report-confirmation p {
  color: var(--muted);
}

.check-control {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  min-height: 40px;
}

.check-control input {
  width: 18px;
  min-height: 18px;
}

.editor-error {
  margin: 0 20px;
}

.editor-form footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.timeline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.records-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.records-heading-actions .secondary-button {
  text-decoration: none;
}

.advanced-filters .filter-control input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 6px;
  backdrop-filter: blur(10px);
}

.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-weight: 600;
}

.filter-heading-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-toggle {
  display: none;
  align-items: center;
  gap: 5px;
}

.filter-toggle svg {
  width: 14px;
  height: 14px;
}

.text-button {
  min-height: 36px;
  padding: 3px 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
}

.advanced-filters {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.advanced-filters summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
}

.query-builder-trigger {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  color: #fff;
  background: var(--teal);
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.query-builder-trigger svg {
  width: 16px;
  height: 16px;
}

.query-builder {
  margin-bottom: 22px;
  overflow: hidden;
  background: #f6f7f3;
  border: 1px solid var(--line-strong);
  border-top: 4px solid #b64a31;
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(22, 48, 42, 0.12);
}

.query-builder[hidden] {
  display: none;
}

.query-builder-heading {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  color: #fff;
  background: #173f38;
}

.query-builder-heading p,
.query-group-heading span {
  margin: 0 0 3px;
  color: #a9c3bb;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.query-builder-heading h2,
.query-group-heading h3 {
  margin: 0;
  letter-spacing: 0;
}

.restricted-contact-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(90deg, #f4f6f5, #eef2f0);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.restricted-contact-card svg { width: 20px; color: var(--teal); }
.restricted-contact-card span { display: grid; gap: 2px; }
.restricted-contact-card small { color: var(--muted); }

.roster-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.roster-heading h3 { margin: 0; }
.roster-heading label { display: grid; gap: 4px; min-width: 180px; }
.roster-heading label span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.roster-heading select { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

.account-view { max-width: 1120px; margin: 0 auto; }
.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  color: #fff;
  background: linear-gradient(130deg, #17201e 0%, #253c37 70%, #1d6d63 140%);
  border-radius: 14px 14px 0 0;
}
.account-hero h1, .account-hero p { margin: 0; }
.account-hero h1 { margin: 3px 0 9px; font-size: clamp(22px, 3vw, 34px); overflow-wrap: anywhere; }
.account-hero p { color: #9fc7bf; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.account-hero > div > span, .account-identity > div > span { color: #c6d8d3; font-size: 13px; }
.account-hero .secondary-button { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.account-identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.account-avatar {
  width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 58px;
  color: #fff; background: var(--teal); border: 1px solid rgba(255,255,255,.4); border-radius: 50%;
}
.account-avatar svg { width: 28px; height: 28px; }
.account-role-badge {
  display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px;
  color: #155148 !important; background: #d7f0ea; border-radius: 999px;
  font-size: 10px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.account-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-top: 0; }
.account-summary-grid > div { display: flex; align-items: center; gap: 13px; min-height: 88px; padding: 18px 24px; border-right: 1px solid var(--line); }
.account-summary-grid > div:last-child { border-right: 0; }
.account-summary-grid svg { width: 21px; color: var(--teal); }
.account-summary-grid span, .account-summary-grid small, .account-summary-grid strong { display: block; }
.account-summary-grid small { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.account-summary-grid strong { font-size: 14px; }
.account-notice { display: flex; gap: 14px; margin-top: 22px; padding: 18px 20px; background: #fff7df; border: 1px solid #dfc676; border-radius: 10px; }
.account-notice svg { flex: 0 0 22px; color: #856611; }
.account-notice h2, .account-notice p { margin: 0; }
.account-notice h2 { font-size: 16px; }
.account-notice p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.account-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.account-card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 20px rgba(26, 40, 36, .04); }
.account-card-wide { grid-column: 1 / -1; }
.account-card > p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.account-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.account-card-heading > svg { width: 22px; height: 22px; color: var(--teal); }
.account-card-heading p, .account-card-heading h2 { margin: 0; }
.account-card-heading p { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.account-card-heading h2 { margin-top: 2px; font-size: 18px; }
.account-password-form { display: grid; gap: 12px; }
.account-password-form label { display: grid; gap: 5px; }
.account-password-form label span, .admin-role-control > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.account-password-form input, .admin-role-control select { min-height: 42px; padding: 8px 11px; background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; }
.account-password-form .command-button { justify-self: start; margin-top: 3px; }
.account-form-message { margin: 0; padding: 9px 11px; border-radius: 6px; font-size: 12px; }
.account-form-message.is-error { color: #7a251f; background: #fae9e7; }
.account-form-message.is-success { color: #155148; background: #e2f2ed; }
.account-list { display: grid; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.account-list > div, .admin-user-list > div {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--line);
}
.account-list > div:last-child, .admin-user-list > div:last-child { border-bottom: 0; }
.account-list > div > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-list > div > span > span { min-width: 0; }
.account-list strong { overflow-wrap: anywhere; }
.account-list small, .admin-user-list small { display: block; color: var(--muted); }
.account-watch-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.account-watch-link > svg { flex: 0 0 18px; color: var(--teal); }
.account-watch-link > span { min-width: 0; }
.account-list > .is-paused { background: #f7f8f7; }
.account-list > .is-paused .account-watch-link { color: var(--muted); }
.account-list > .is-paused .account-watch-link > svg { color: #7c8581; }
.inline-account-form { display: flex; gap: 8px; max-width: 520px; }
.inline-account-form input { flex: 1; min-width: 0; }
.account-key-result { margin: 12px 0; padding: 14px; background: #eef7f3; border: 1px solid #a9d2c0; border-radius: 8px; }
.account-key-result code { display: block; margin-top: 8px; overflow-wrap: anywhere; user-select: all; }
.api-docs-link {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) 18px; align-items: center; gap: 11px;
  margin: 14px 0 18px; padding: 13px 14px; color: inherit; background: #eef7f3;
  border: 1px solid #afd2c8; border-radius: 8px; text-decoration: none;
}
.api-docs-link:hover { border-color: var(--teal); }
.api-docs-link > svg:first-child { width: 19px; color: var(--teal); }
.api-docs-link > svg:last-child { width: 16px; color: var(--muted); }
.api-docs-link span { display: grid; gap: 2px; }
.api-docs-link small { color: var(--muted); }
.admin-users-view .account-hero { border-radius: 14px; }
.admin-jobs-view .account-hero { border-radius: 14px; }
.admin-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 22px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-summary > div { display: grid; gap: 3px; padding: 18px 22px; border-right: 1px solid var(--line); }
.admin-summary > div:last-child { border-right: 0; }
.admin-summary strong { font: 500 22px "IBM Plex Mono", monospace; }
.admin-summary span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.admin-user-list { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.admin-user-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.admin-user-identity { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.admin-user-identity > span:last-child { min-width: 0; }
.admin-user-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.admin-user-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; color: var(--teal); background: #e5f1ee; border-radius: 50%; }
.admin-user-avatar svg { width: 18px; }
.admin-role-control { display: grid; gap: 6px; }
.account-totals { display: grid; gap: 9px; margin: 0; }
.account-totals div { display: flex; justify-content: space-between; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.account-totals div:last-child { border: 0; }
.account-totals dt { color: var(--muted); }
.account-totals dd { margin: 0; font: 500 14px "IBM Plex Mono", monospace; }
.activity-list { display: grid; margin-top: 6px; }
.activity-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal); background: #edf5f2; border-radius: 50%; }
.activity-icon svg { width: 16px; }
.activity-copy { min-width: 0; }
.activity-copy strong, .activity-copy small { display: block; }
.activity-copy small { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.activity-row time { color: var(--muted); font: 500 10px "IBM Plex Mono", monospace; white-space: nowrap; }
.audit-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.audit-pagination > span { color: var(--muted); font: 500 11px "IBM Plex Mono", monospace; }
.audit-pagination .secondary-button { gap: 7px; }
.audit-pagination svg { width: 15px; height: 15px; }
.job-section { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.job-section > header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #f6f8f6; border-bottom: 1px solid var(--line); }
.job-section > header p, .job-section > header h2 { margin: 0; }
.job-section > header p, .job-row-main header p, .job-todo-row p { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.job-section > header h2 { margin-top: 2px; font-size: 18px; }
.job-section > header > span { color: var(--muted); font: 500 11px "IBM Plex Mono", monospace; }
.scheduler-state.is-active { color: #155148; }
.scheduler-state.is-paused { color: #7a251f; }
.job-list { display: grid; }
.job-row { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 15px; padding: 20px; border-bottom: 1px solid var(--line); }
.job-row:last-child { border-bottom: 0; }
.job-row-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--teal); background: #e5f2ee; border-radius: 50%; }
.job-row-icon svg { width: 19px; }
.job-row-main { min-width: 0; }
.job-row-main > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.job-row-main h2, .job-row-main p { margin: 0; }
.job-row-main h2 { margin-top: 2px; font-size: 16px; }
.job-row-main > p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.job-status { display: inline-flex; align-items: center; width: fit-content; flex: 0 0 auto; padding: 4px 8px; color: #43504c; background: #edf0ef; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.job-status.status-succeeded { color: #155148; background: #d7f0ea; }
.job-status.status-running { color: #40568b; background: #e8edf8; }
.job-status.status-failed, .job-status.status-interrupted { color: #7a251f; background: #fae9e7; }
.job-status.status-manual { color: #725212; background: #fff0bf; }
.job-metadata { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 17px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.job-metadata > div { min-width: 0; padding: 10px 12px; background: #fafbfa; }
.job-metadata dt { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.job-metadata dd { margin: 4px 0 0; overflow-wrap: anywhere; font: 500 11px "IBM Plex Mono", monospace; }
.job-output { margin-top: 12px; }
.job-output summary { width: fit-content; color: var(--teal); font-size: 11px; font-weight: 700; cursor: pointer; }
.job-output pre { max-height: 240px; margin: 9px 0 0; padding: 13px; overflow: auto; color: #d3eee7; background: #182321; border-radius: 6px; font: 11px/1.55 "IBM Plex Mono", monospace; white-space: pre-wrap; }
.job-todo-list { display: grid; }
.job-todo-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.job-todo-row:last-child { border-bottom: 0; }
.job-todo-row > span:first-child { color: #8a6712; }
.job-todo-row > span:first-child svg { width: 18px; }
.job-todo-row p, .job-todo-row strong, .job-todo-row small { display: block; margin: 0; }
.job-todo-row strong { margin: 2px 0 3px; font-size: 14px; }
.job-todo-row small { color: var(--muted); line-height: 1.45; }

.docs-view, .about-view { width: min(1120px, calc(100% - 36px)); margin: 28px auto 54px; }
.docs-hero, .about-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: clamp(28px, 5vw, 52px); color: #fff;
  background: linear-gradient(130deg, #17201e 0%, #25433d 68%, #14766b 145%);
  border-radius: 14px;
}
.docs-hero h1, .docs-hero p, .about-hero h1, .about-hero p { margin: 0; }
.docs-hero h1, .about-hero h1 { max-width: 820px; margin: 5px 0 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.08; letter-spacing: -.03em; }
.docs-hero p, .about-hero p, .api-section > header p, .api-example > div p {
  color: #9fc7bf; font: 500 10px "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase;
}
.docs-hero span, .about-hero span { color: #ccddd8; font-size: 13px; line-height: 1.5; }
.docs-hero .secondary-button { flex: 0 0 auto; color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); text-decoration: none; }
.about-hero > svg { width: 78px; height: 78px; flex: 0 0 78px; color: #75c8ba; opacity: .8; }
.docs-intro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.docs-intro-grid > section { display: flex; gap: 15px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.docs-card-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; color: var(--teal); background: #e5f2ee; border-radius: 50%; }
.docs-card-icon svg { width: 18px; }
.docs-intro-grid h2, .docs-intro-grid p { margin: 0; }
.docs-intro-grid h2 { margin: 3px 0 7px; font-size: 18px; }
.docs-intro-grid p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.docs-intro-grid div > p:first-child { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.docs-view code, .about-view code { font-family: "IBM Plex Mono", monospace; }
.api-example { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 18px; margin-bottom: 22px; padding: 20px 22px; color: #fff; background: #1c2926; border-radius: 10px; }
.api-example h2, .api-example p { margin: 0; }
.api-example h2 { margin-top: 3px; font-size: 18px; }
.api-example pre { min-width: 0; margin: 0; padding: 14px 16px; overflow-x: auto; color: #d3eee7; background: #111a18; border: 1px solid #40544f; border-radius: 6px; font-size: 12px; line-height: 1.6; }
.api-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 28px; }
.api-toc span { margin-right: 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.api-toc a { min-height: 36px; display: inline-flex; align-items: center; padding: 6px 9px; color: var(--teal); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 600; text-decoration: none; }
.api-section { margin: 28px 0; scroll-margin-top: 20px; }
.api-section > header { margin-bottom: 10px; }
.api-section > header h2, .api-section > header p { margin: 0; }
.api-section > header h2 { margin-top: 2px; font-size: 23px; }
.api-section > header p { color: var(--muted); }
.api-operation-list { overflow: hidden; background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; }
.api-operation { border-bottom: 1px solid var(--line); }
.api-operation:last-child { border-bottom: 0; }
.api-operation summary { display: grid; grid-template-columns: 54px minmax(190px, .85fr) minmax(180px, 1fr) auto 18px; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; cursor: pointer; list-style: none; }
.api-operation summary::-webkit-details-marker { display: none; }
.api-operation summary:hover { background: #f7f9f7; }
.api-operation summary > code { overflow-wrap: anywhere; color: #1c4c45; font-size: 12px; }
.api-operation summary > strong { font-size: 13px; }
.api-operation summary > svg { width: 16px; color: var(--muted); transition: transform 140ms ease; }
.api-operation[open] summary > svg { transform: rotate(180deg); }
.api-method { display: inline-flex; justify-content: center; padding: 5px 6px; color: #fff; border-radius: 4px; font: 600 10px "IBM Plex Mono", monospace; }
.api-method-get { background: #267267; }
.api-method-post { background: #315f98; }
.api-method-delete { background: #a54638; }
.api-access { padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.api-access-public { color: #3f5c55; background: #e9efed; }
.api-access-free { color: #40568b; background: #e8edf8; }
.api-access-pro { color: #725212; background: #fff0bf; }
.api-access-superuser { color: #6e342a; background: #f9e4df; }
.api-operation-body { padding: 2px 84px 20px; border-top: 1px solid var(--line); }
.api-operation-body > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.api-operation-body h3 { margin: 16px 0 8px; font-size: 13px; }
.api-no-parameters { font-style: italic; }
.api-parameters { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 6px; }
.api-parameters li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.api-parameters li:last-child { border-bottom: 0; }
.api-parameters li code { color: var(--teal); font-size: 12px; font-weight: 600; }
.api-parameters li span { color: var(--muted); font-size: 11px; }
.api-parameters li p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; }
.docs-footer-note { padding: 24px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 8px; }
.docs-footer-note h2, .docs-footer-note p { margin: 0; }
.docs-footer-note h2 { font-size: 18px; }
.docs-footer-note p { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.about-lede { max-width: 900px; margin: 30px auto; font-size: clamp(18px, 2.5vw, 24px); line-height: 1.5; }
.about-lede p { margin: 0; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.about-grid > section { display: flex; gap: 16px; padding: clamp(21px, 3vw, 30px); background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.about-grid > section > span { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; color: var(--teal); background: #e8f3f0; border-radius: 50%; }
.about-grid > section > span svg { width: 20px; }
.about-grid h2, .about-grid p { margin: 0; }
.about-grid h2 { margin-bottom: 8px; font-size: 18px; }
.about-grid p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.about-grid p + p { margin-top: 11px; }
.about-grid a { display: inline-flex; align-items: center; gap: 5px; color: var(--teal); font-weight: 600; }
.about-grid a svg { width: 13px; }
.about-corrections { display: flex; gap: 18px; margin-top: 20px; padding: clamp(24px, 4vw, 38px); background: #fff7df; border: 1px solid #dfc676; border-radius: 11px; }
.about-corrections > svg { width: 26px; flex: 0 0 26px; color: #8a6712; }
.about-corrections h2, .about-corrections p { margin: 0; }
.about-corrections div > p:first-child { color: #856611; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.about-corrections h2 { margin: 4px 0 8px; font-size: 21px; }
.about-corrections div > p:last-child { color: #5e5439; font-size: 13px; line-height: 1.6; }
.about-footer { display: flex; gap: 10px; margin-top: 22px; }
.about-footer a { text-decoration: none; }

@media (max-width: 680px) {
  .roster-heading, .account-hero, .inline-account-form { align-items: stretch; flex-direction: column; }
  .roster-heading label { min-width: 0; }
  .account-summary-grid, .account-card-grid { grid-template-columns: 1fr; }
  .account-summary-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .account-summary-grid > div:last-child { border-bottom: 0; }
  .account-card-wide { grid-column: auto; }
  .admin-user-list > div { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-user-list > div > .secondary-button { grid-column: 1 / -1; justify-self: end; }
  .admin-summary > div:nth-child(2n) { border-right: 0; }
  .job-metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-todo-row { grid-template-columns: 24px minmax(0, 1fr); }
  .job-todo-row > .job-status { grid-column: 2; }
  .activity-row { grid-template-columns: 36px minmax(0, 1fr); }
  .activity-row time { grid-column: 2; }
  .audit-pagination { flex-wrap: wrap; }
  .docs-hero, .about-hero, .about-footer { align-items: stretch; flex-direction: column; }
  .docs-intro-grid, .about-grid { grid-template-columns: 1fr; }
  .api-example { grid-template-columns: 1fr; }
  .api-operation summary { grid-template-columns: 54px minmax(0, 1fr) 18px; gap: 8px; }
  .api-operation summary > strong { grid-column: 2; }
  .api-operation summary > .api-access { grid-column: 1 / 3; grid-row: 3; justify-self: start; }
  .api-operation summary > svg { grid-column: 3; grid-row: 1 / 3; }
  .api-operation-body { padding: 2px 18px 18px; }
  .api-parameters li { grid-template-columns: 1fr; }
  .api-parameters li p { grid-column: auto; }
  .about-hero > svg { display: none; }
}

.query-builder-heading h2 {
  font-size: 21px;
}

.query-builder-heading .icon-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.query-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.query-presets button {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.query-presets button:last-child {
  border-right: 0;
}

.query-presets button:hover,
.query-presets button:focus-visible {
  color: var(--teal);
  background: #edf3ef;
}

.query-presets svg {
  flex: 0 0 auto;
  width: 17px;
  color: #b64a31;
}

.query-builder-body {
  padding: 4px 22px;
}

.query-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.query-group:last-child {
  border-bottom: 0;
}

.query-group-heading,
.query-builder-footer,
.query-builder-footer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.query-group-heading h3 {
  font-size: 16px;
}

.query-group-heading span {
  color: var(--muted);
}

.compact-button {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 11px;
}

.query-clauses {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.query-clause {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 34px;
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
}

.query-clause-number {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
}

.query-clause-number span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.query-clause-number strong {
  font-size: 11px;
  line-height: 1.25;
}

.query-clause-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(105px, 1fr));
  gap: 9px;
}

.query-clause-fields label,
.query-metric-grid label {
  display: block;
  min-width: 0;
}

.query-clause-fields label > span,
.query-metric-grid label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.query-clause-fields input,
.query-clause-fields select,
.query-metric-grid input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
}

.query-clause-fields select {
  padding-right: 26px;
}

.query-wide-field {
  grid-column: span 2;
}

.query-remove {
  margin-top: 18px;
  color: #9b3c2a;
}

.query-empty {
  margin: 12px 0 0;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--line-strong);
  font-size: 12px;
}

.query-metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.query-builder-footer {
  min-height: 64px;
  padding: 12px 22px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.query-builder-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.active-query-summary {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  color: #173f38;
  background: #e5efea;
  border-left: 3px solid var(--teal);
}

.active-query-summary[hidden] {
  display: none;
}

.active-query-summary > svg {
  width: 18px;
  height: 18px;
}

.active-query-summary p {
  min-width: 0;
  margin: 0;
}

.active-query-summary strong,
.active-query-summary span {
  display: block;
}

.active-query-summary strong {
  font-size: 11px;
}

.active-query-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voter-query-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.voter-query-grid label,
.voter-tool-controls label {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}

.voter-query-grid label > span,
.voter-tool-controls label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.voter-query-grid input,
.voter-query-grid select,
.voter-tool-controls select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
}

.voter-query-grid select[multiple] {
  min-height: 112px;
  padding: 4px;
}

.voter-query-grid select[multiple] option {
  padding: 5px 7px;
}

.voter-history-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.voter-history-grid label:nth-last-child(-n + 2) {
  grid-column: span 1;
}

.voter-workbench {
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--teal);
}

.workbench-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 48px;
  background: #edf0ed;
  border-bottom: 1px solid var(--line);
}

.workbench-tabs button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}

.workbench-tabs button:last-child {
  border-right: 0;
}

.workbench-tabs button.is-active {
  color: #fff;
  background: #173f38;
}

.workbench-tabs button.is-locked:not(.is-active) {
  color: #6e746f;
  background: #e4e7e3;
}

.analysis-lock {
  display: none;
  width: 12px !important;
  height: 12px !important;
  color: #8a5c00;
}

.workbench-tabs button.is-locked .analysis-lock {
  display: block;
}

.workbench-tabs svg {
  width: 16px;
  height: 16px;
}

.voter-tool-panel {
  min-height: 420px;
  padding: 20px;
}

.voter-tool-heading,
.voter-tool-controls,
.export-option-heading,
.geometry-notice,
.insight-summary,
.map-summary {
  display: flex;
  align-items: center;
}

.voter-tool-heading {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.voter-tool-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.analysis-csv-button,
.analysis-icon-button {
  min-height: 38px;
}

.analysis-csv-button {
  gap: 6px;
  padding-inline: 11px;
  text-decoration: none;
}

.analysis-icon-button {
  width: 38px;
  padding: 0;
  justify-content: center;
}

body.analysis-expanded {
  overflow: hidden;
}

.voter-workbench.is-expanded {
  position: fixed;
  inset: 14px;
  z-index: 120;
  margin: 0;
  overflow: auto;
  box-shadow: 0 20px 70px rgb(11 32 27 / 32%);
}

.voter-workbench.is-expanded .voter-tool-panel {
  min-height: calc(100vh - 80px);
}

.voter-workbench.is-expanded .voter-leaflet-map {
  height: calc(100vh - 330px);
  min-height: 420px;
}

.voter-tool-heading p,
.voter-tool-heading h2,
.export-option-heading h3,
.export-option-heading p,
.geometry-notice p,
.geometry-notice strong,
.geometry-notice span {
  margin: 0;
}

.voter-tool-heading p {
  color: #b64a31;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.voter-tool-heading h2 {
  margin-top: 3px;
  font-size: 20px;
  letter-spacing: 0;
}

.voter-tool-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0;
}

.voter-tool-controls .wide-control {
  grid-column: span 2;
}

.map-detail-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: var(--ink);
  background: #edf3f1;
  border-left: 3px solid var(--teal);
}

.map-detail-status > svg {
  flex: 0 0 auto;
  width: 18px;
  color: var(--teal);
}

.map-detail-status span,
.map-detail-status small,
.map-detail-status strong {
  display: block;
}

.map-detail-status span {
  min-width: 0;
}

.map-detail-status small,
.map-detail-status em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.map-detail-status strong {
  margin-top: 1px;
  font-size: 12px;
}

.map-detail-status em {
  margin-left: auto;
  text-align: right;
}

.voter-tool-output {
  min-height: 280px;
}

.tool-placeholder,
.loading-inline,
.result-note {
  margin: 0;
  padding: 28px 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.insight-summary,
.map-summary {
  gap: 8px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 12px;
}

.insight-summary strong,
.map-summary strong {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
}

.insight-chart {
  position: relative;
  width: 100%;
  height: 360px;
  padding: 12px;
  border: 1px solid var(--line);
}

.insight-table-wrap {
  max-height: 420px;
  margin-top: 16px;
  overflow: auto;
  border: 1px solid var(--line);
}

.insight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.insight-table th,
.insight-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.insight-table th {
  position: sticky;
  top: 0;
  background: #edf0ed;
  font-size: 10px;
  text-transform: uppercase;
}

.geometry-notice {
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  color: #6f4c00;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
}

.geometry-notice > svg {
  flex: 0 0 auto;
  width: 20px;
}

.geometry-notice strong,
.geometry-notice span {
  display: block;
  font-size: 11px;
}

.voter-leaflet-map {
  width: 100%;
  height: clamp(380px, 55vh, 620px);
  overflow: hidden;
  background: #e7ece8;
  border: 1px solid var(--line-strong);
}

.voter-leaflet-map .leaflet-tile-pane,
.voter-leaflet-map .leaflet-basemap-pane {
  z-index: 200;
  filter: grayscale(0.75) saturate(0.55) contrast(0.92);
}

.voter-leaflet-map .leaflet-overlay-pane {
  z-index: 400;
}

.voter-leaflet-map .leaflet-countyOutlines-pane {
  z-index: 460;
}

.voter-leaflet-map .leaflet-control-attribution {
  color: #4b5a55;
  background: rgb(255 255 255 / 78%);
  font-size: 9px;
}

.voter-leaflet-map .leaflet-tooltip {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: 0 6px 18px rgb(23 35 31 / 16%);
  font-size: 11px;
}

.voter-map-caption,
.voter-map-legend {
  display: flex;
  align-items: center;
}

.voter-map-caption {
  min-height: 38px;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-top: 0;
  font-size: 10px;
}

.geometry-notice span {
  margin-top: 2px;
  color: #725f36;
}

.voter-map-figure {
  margin: 0 0 18px;
  overflow: hidden;
  background: #f7f8f5;
  border: 1px solid var(--line);
}

.voter-map-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 520px;
}

.voter-map-region path {
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 0.85px;
  vector-effect: non-scaling-stroke;
  transition: filter 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.voter-map-region.is-interactive {
  cursor: pointer;
  outline: none;
}

.voter-map-region.is-interactive:hover path,
.voter-map-region.is-interactive:focus path {
  filter: brightness(0.88) saturate(1.12);
  stroke: var(--ink);
  stroke-width: 1.8px;
}

.voter-map-figure figcaption,
.voter-map-legend {
  display: flex;
  align-items: center;
}

.voter-map-figure figcaption {
  min-height: 38px;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.voter-map-legend {
  gap: 7px;
}

.voter-map-legend i {
  width: 88px;
  height: 8px;
  border: 1px solid rgba(23, 35, 31, 0.12);
}

.voter-map-legend .party-scale {
  background: linear-gradient(90deg, #4c79a8, #ddd8c9 50%, #bc5845);
}

.voter-map-legend .result-scale {
  background: linear-gradient(90deg, #edf3f2, #176b62);
}

.voter-map-legend .turnout-scale {
  background: linear-gradient(90deg, hsl(174 42% 94%), hsl(174 42% 45%));
}

.map-region-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.map-region-list button {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(140px, 1.4fr) 100px 18px;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.map-region-list button:not(:disabled):hover {
  background: var(--teal-soft);
}

.map-region-list button:disabled {
  opacity: 1;
}

.map-region-name,
.map-region-count {
  min-width: 0;
}

.map-region-name strong,
.map-region-name small,
.map-region-count strong,
.map-region-count small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-region-name small,
.map-region-count small {
  min-height: 14px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.map-region-count {
  text-align: right;
}

.map-region-bar {
  position: relative;
  width: var(--region-size);
  min-width: 3px;
  height: 12px;
  background: linear-gradient(90deg, #83aaa4, #176b62);
}

.export-options {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 14px;
  padding-top: 16px;
}

.export-options > section {
  display: flex;
  min-width: 0;
  min-height: 240px;
  flex-direction: column;
  padding: 16px;
  background: #f7f8f5;
  border: 1px solid var(--line);
  border-top: 3px solid #b64a31;
}

.export-option-heading {
  align-items: flex-start;
  gap: 10px;
}

.export-option-heading > svg {
  flex: 0 0 auto;
  width: 20px;
  color: var(--teal);
}

.export-option-heading h3 {
  font-size: 14px;
}

.export-option-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.export-options details {
  margin: 18px 0;
  font-size: 11px;
}

.export-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  max-height: 250px;
  margin-top: 9px;
  overflow: auto;
}

.export-field-grid label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.export-field-grid span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-options .command-button,
.export-options .secondary-button {
  justify-content: center;
  width: 100%;
  margin-top: auto;
  text-decoration: none;
}

.records[data-voter-view]:not([data-voter-view="results"]) #start-state,
.records[data-voter-view]:not([data-voter-view="results"]) #loading-state,
.records[data-voter-view]:not([data-voter-view="results"]) #empty-state,
.records[data-voter-view]:not([data-voter-view="results"]) #people-columns,
.records[data-voter-view]:not([data-voter-view="results"]) #voter-columns,
.records[data-voter-view]:not([data-voter-view="results"]) #record-list,
.records[data-voter-view]:not([data-voter-view="results"]) .pagination {
  display: none;
}

@media (max-width: 900px) {
  .voter-query-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voter-history-grid,
  .export-options {
    grid-template-columns: 1fr;
  }

  .export-options > section {
    min-height: 180px;
  }
}

@media (max-width: 640px) {
  .voter-query-grid,
  .voter-tool-controls {
    grid-template-columns: 1fr;
  }

  .voter-tool-controls .wide-control {
    grid-column: auto;
  }

  .workbench-tabs button {
    min-height: 48px;
    padding: 6px;
  }

  .workbench-tabs button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .voter-tool-panel {
    padding: 14px;
  }

  .voter-tool-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .voter-tool-heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .voter-tool-heading-actions .command-button {
    margin-left: auto;
  }

  .insight-chart {
    height: 280px;
    padding: 6px;
  }

  .voter-leaflet-map {
    height: 420px;
  }

  .voter-map-caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .map-detail-status em {
    display: none;
  }

  .voter-workbench.is-expanded {
    inset: 0;
  }

  .voter-workbench.is-expanded .voter-leaflet-map {
    height: 58vh;
    min-height: 360px;
  }

  .map-region-list button {
    grid-template-columns: minmax(100px, 1fr) 76px 14px;
    gap: 8px;
  }

  .map-region-bar {
    display: none;
  }

  .export-field-grid {
    grid-template-columns: 1fr;
  }
}

.person-row .career-metrics {
  grid-column: 2 / 6;
  grid-row: 2;
  display: flex;
  gap: 14px;
  margin-top: -5px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
}

.person-row:has(.career-metrics) {
  min-height: 96px;
}

.person-row:has(.career-metrics) > svg {
  grid-column: 6;
  grid-row: 1 / 3;
}

.inline-filter {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 500;
}

.roster-table {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.roster-table-header,
.roster-table-row {
  min-width: 720px;
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(140px, 0.8fr) 110px;
  align-items: center;
}

.roster-table-header {
  min-height: 42px;
  background: #edf0ed;
  border-bottom: 1px solid var(--line-strong);
}

.roster-table-header > span,
.roster-table-row > span {
  min-width: 0;
  padding: 10px 14px;
}

.roster-table-row {
  --timeline-fill: #ecefed;
  --timeline-accent: #9aa39e;
  min-height: 58px;
  color: var(--ink);
  background-color: var(--timeline-fill);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.roster-table-row:last-child {
  border-bottom: 0;
}

.roster-table-row:hover {
  background-color: var(--timeline-fill);
  box-shadow: inset 0 0 0 2px var(--timeline-accent);
}

.roster-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.muted-text,
.roster-empty {
  color: var(--muted);
}

.roster-empty {
  margin: 0;
  padding: 18px;
}

.membership-gantt-shell {
  --membership-position-width: 180px;
  --membership-row-height: 48px;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.membership-gantt-shell:focus-visible {
  outline: 3px solid rgba(8, 126, 115, 0.28);
  outline-offset: 2px;
}

.membership-gantt {
  --membership-time-width: 72px;
  --membership-year-width: 72px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  width: calc(var(--membership-position-width) + var(--membership-timeline-width));
}

.membership-gantt-position {
  width: var(--membership-position-width);
}

.membership-gantt-time {
  width: var(--membership-time-width);
}

.membership-gantt-scale-12 {
  --membership-time-width: 6px;
}

.membership-gantt-scale-4 {
  --membership-time-width: 18px;
}

.membership-gantt th,
.membership-gantt td {
  box-sizing: border-box;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.membership-gantt thead th {
  height: 32px;
  padding: 0 8px;
  color: var(--muted);
  background: #edf0ed;
  border-bottom-color: var(--line-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  vertical-align: middle;
}

.membership-gantt tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  overflow: hidden;
  background-clip: border-box;
  border-right-color: var(--line-strong);
  box-shadow: 1px 0 0 var(--line-strong);
}

.membership-gantt tbody th {
  height: var(--membership-row-height);
  padding: 5px 12px;
  color: var(--ink);
  background: var(--paper);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.membership-gantt .membership-gantt-spacer > * {
  height: 10px;
  padding: 0;
  background: var(--canvas);
  border-bottom-color: var(--line-strong);
}

.membership-gantt .membership-gantt-staff > th {
  background: #f6f5f0;
}

.membership-gantt-track {
  position: relative;
  height: var(--membership-row-height);
  padding: 0;
  overflow: hidden;
  background-color: #fbfcfa;
  background-image: linear-gradient(to right, transparent calc(100% - 1px), var(--line) 0);
  background-size: var(--membership-year-width) 100%;
}

.membership-gantt-term {
  --timeline-color: #3f4945;
  --timeline-fill: #ecefed;
  --timeline-accent: #9aa39e;
  position: absolute;
  top: 0;
  bottom: 0;
  left: attr(data-term-left %);
  width: max(attr(data-term-width %), 1px);
  box-sizing: border-box;
  padding: 4px 6px;
  color: var(--timeline-color);
  background-color: var(--timeline-fill);
  border-left: 3px solid var(--timeline-accent);
  text-decoration: none;
}

.membership-gantt-term.party-democratic,
.personal-service-box.party-democratic,
.personal-event-marker.party-democratic,
.party-change-destination.party-democratic,
.election-candidate.party-democratic,
.person-row.party-democratic,
.roster-table-row.party-democratic {
  --timeline-color: #173d6b;
  --timeline-fill: #dcecff;
  --timeline-accent: #4384c4;
}

.membership-gantt-term.party-republican,
.personal-service-box.party-republican,
.personal-event-marker.party-republican,
.party-change-destination.party-republican,
.election-candidate.party-republican,
.person-row.party-republican,
.roster-table-row.party-republican {
  --timeline-color: #6d2929;
  --timeline-fill: #f8dede;
  --timeline-accent: #c96666;
}

.membership-gantt-term.party-unaffiliated,
.personal-service-box.party-unaffiliated,
.personal-event-marker.party-unaffiliated,
.party-change-destination.party-unaffiliated,
.election-candidate.party-unaffiliated,
.person-row.party-unaffiliated,
.roster-table-row.party-unaffiliated {
  --timeline-color: #56386f;
  --timeline-fill: #eadff4;
  --timeline-accent: #8b68a6;
}

.membership-gantt-term.party-libertarian,
.personal-service-box.party-libertarian,
.personal-event-marker.party-libertarian,
.party-change-destination.party-libertarian,
.election-candidate.party-libertarian,
.person-row.party-libertarian,
.roster-table-row.party-libertarian {
  --timeline-color: #5c4811;
  --timeline-fill: #f8edbf;
  --timeline-accent: #b7952f;
}

.membership-gantt-term.party-green,
.personal-service-box.party-green,
.personal-event-marker.party-green,
.party-change-destination.party-green,
.election-candidate.party-green,
.person-row.party-green,
.roster-table-row.party-green {
  --timeline-color: #245332;
  --timeline-fill: #dcefdc;
  --timeline-accent: #609a68;
}

.personal-event-marker.party-constitution,
.party-change-destination.party-constitution {
  --timeline-color: #3f4854;
  --timeline-fill: #e7ebef;
  --timeline-accent: #7d8996;
}

.personal-event-marker.party-no-labels,
.party-change-destination.party-no-labels {
  --timeline-color: #34545a;
  --timeline-fill: #dfedef;
  --timeline-accent: #699aa2;
}

.personal-event-marker.party-justice-for-all,
.party-change-destination.party-justice-for-all {
  --timeline-color: #65400d;
  --timeline-fill: #f8e8c9;
  --timeline-accent: #b47d2d;
}

.personal-event-marker.party-we-the-people,
.party-change-destination.party-we-the-people {
  --timeline-color: #5d315f;
  --timeline-fill: #f0e0f1;
  --timeline-accent: #9b61a0;
}

.membership-gantt-term.has-unknown-start {
  border-left-style: dashed;
}

.membership-gantt-term strong {
  position: absolute;
  top: 4px;
  left: attr(data-label-left px, 6px);
  z-index: 1;
  display: block;
  width: max-content;
  max-width: calc(100% - 12px);
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  line-height: calc(var(--membership-row-height) - 10px);
}

.membership-gantt-term.is-current strong {
  font-weight: 700;
}

@media (max-width: 640px) {
  .membership-gantt-shell {
    --membership-position-width: 116px;
    --membership-row-height: 52px;
  }

  .membership-gantt-shell.has-district-labels {
    --membership-position-width: 84px;
  }

  .membership-gantt tbody th {
    padding-inline: 10px;
    font-size: 11px;
  }
}

.filter-control {
  display: block;
  margin-top: 14px;
}

.filter-control span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.filter-control select {
  width: 100%;
  min-height: 40px;
  padding: 8px 32px 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding-top: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.privacy-note svg {
  flex: 0 0 auto;
  color: var(--teal);
}

.privacy-note p {
  margin: 0;
  font-size: 11px;
}

.records {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(23, 32, 30, 0.06);
}

.records-heading {
  min-height: 52px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.records-heading p,
.records-heading h1 {
  margin: 0;
}

.records-heading p {
  margin-bottom: 4px;
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.records-heading h1 {
  font-size: clamp(21px, 2.5vw, 29px);
  font-weight: 600;
  letter-spacing: 0;
}

.result-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.record-list {
  border-top: 0;
}

.record-columns {
  display: grid;
  grid-template-columns: 48px minmax(150px, 1.05fr) minmax(130px, 0.9fr) minmax(170px, 1fr) minmax(110px, 0.65fr) 24px;
  align-items: center;
  gap: 14px;
  min-height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line-strong);
}

.sort-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.sort-button:hover,
.sort-button.is-active {
  color: var(--ink);
}

.sort-button svg {
  width: 13px;
  height: 13px;
}

.record-row {
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 52px minmax(190px, 1.15fr) minmax(180px, 1fr) minmax(130px, 0.65fr) 32px;
  align-items: center;
  gap: 16px;
  padding: 14px 8px;
  color: inherit;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e8ebe7;
}

.record-row.person-row {
  grid-template-columns: 48px minmax(150px, 1.05fr) minmax(130px, 0.9fr) minmax(170px, 1fr) minmax(110px, 0.65fr) 24px;
  gap: 14px;
  background-color: var(--timeline-fill, #ecefed);
}

.record-row.voter-row,
.voter-columns {
  grid-template-columns: 48px minmax(180px, 1.15fr) minmax(170px, 1fr) minmax(100px, .55fr) minmax(100px, .55fr) 24px;
  gap: 14px;
}

.voter-symbol {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #c5d7ee;
}

.voter-symbol svg {
  width: 22px;
  height: 22px;
}

.record-row.election-row {
  grid-template-columns: 48px minmax(210px, 1.2fr) minmax(170px, .7fr) minmax(150px, .55fr) 24px;
}

.record-row:hover {
  background: #f8faf8;
}

.record-row.person-row:hover {
  background-color: var(--timeline-fill, #ecefed);
  box-shadow: inset 0 0 0 2px var(--timeline-accent, #9aa39e);
}

.record-row:last-child {
  border-bottom: 0;
}

.avatar,
.organization-symbol {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #c9e3de;
  border-radius: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.organization-symbol svg {
  width: 22px;
  height: 22px;
}

.record-primary,
.record-position,
.record-secondary,
.record-tertiary {
  min-width: 0;
}

.record-primary strong,
.record-primary span,
.record-position strong,
.record-position span,
.record-secondary strong,
.record-secondary span,
.record-tertiary span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-primary strong {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
}

.record-primary span,
.record-position span,
.record-secondary span,
.record-tertiary span {
  color: var(--muted);
  font-size: 12px;
}

.record-position strong {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-secondary strong {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
}

.record-row > svg {
  width: 18px;
  color: #99a39f;
}

.badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex !important;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted) !important;
  background: #f7f8f6;
  font-size: 10px !important;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-democratic {
  color: var(--blue) !important;
  background: var(--blue-soft);
  border-color: #cad8ee;
}

.badge-republican {
  color: var(--red) !important;
  background: var(--red-soft);
  border-color: #efc9c3;
}

.badge-unaffiliated {
  color: var(--gold) !important;
  background: var(--gold-soft);
  border-color: #ebd4a2;
}

.badge-candidate {
  color: var(--teal) !important;
  background: var(--teal-soft);
  border-color: #c9e3de;
}

.badge-inferred {
  color: var(--gold) !important;
  background: var(--gold-soft);
  border-color: #ebd4a2;
}

.badge-button {
  appearance: none;
  font-family: inherit;
  line-height: normal;
  cursor: pointer;
}

.badge-button:hover {
  border-color: #c5a84e;
  filter: brightness(0.97);
}

.badge-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.badge-button[aria-busy="true"] {
  opacity: 0.65;
  cursor: wait;
}

.badge-confirmed {
  color: var(--teal) !important;
  background: var(--teal-soft);
  border-color: #c9e3de;
}

.badge-won,
.badge-unopposed {
  color: var(--blue) !important;
  background: var(--blue-soft);
  border-color: #cad8ee;
}

.badge-current {
  color: var(--blue) !important;
  background: var(--blue-soft);
  border: 2px solid #8eacd5;
  font-weight: 700;
}

.message {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.message-error {
  color: #9e2f23;
  background: var(--red-soft);
  border-color: #efc9c3;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
  background: #fafbfa;
  border-style: dashed;
}

.empty-state svg {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  color: var(--teal);
}

.empty-state strong {
  color: var(--ink);
}

.empty-state span {
  font-size: 13px;
}

.start-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
}

.start-state-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #c9e3de;
  border-radius: 6px;
}

.start-state-icon svg {
  width: 24px;
  height: 24px;
}

.start-state > strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.start-state > span:not(.start-state-icon) {
  max-width: 560px;
  font-size: 13px;
  line-height: 1.55;
}

.start-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.loading-list span {
  height: 88px;
  display: block;
  border-bottom: 1px solid #e8ebe7;
  background: linear-gradient(90deg, #f4f6f3 25%, #fafbfa 50%, #f4f6f3 75%);
  background-size: 220% 100%;
  animation: loading 1.25s ease-in-out infinite;
}

@keyframes loading {
  to { background-position: -120% 0; }
}

.pagination {
  min-height: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.pagination span {
  padding-bottom: 9px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.page-button {
  border-color: var(--line);
}

.profile-view {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px clamp(18px, 5vw, 58px) 64px;
}

.profile-toolbar {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 600;
}

.back-button svg {
  width: 17px;
  height: 17px;
}

.detail {
  padding: clamp(26px, 5vw, 48px) 0;
}

.detail-header {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.detail-header .avatar,
.detail-header .organization-symbol {
  width: 82px;
  height: 82px;
}

.detail-header h2,
.detail-header p {
  margin: 0;
}

.detail-identity {
  min-width: 0;
}

.detail-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-name-row h2 {
  min-width: 0;
}

.detail-name-row .icon-button {
  flex: 0 0 auto;
}

.detail-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.detail-header h2 {
  font-size: clamp(23px, 4vw, 34px);
  line-height: 1.13;
  letter-spacing: 0;
}

.detail-header p {
  margin-top: 7px;
  color: var(--muted);
}

.detail-section {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.party-change-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.party-change-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.party-change-table th,
.party-change-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.party-change-table th {
  color: var(--muted);
  background: var(--paper);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.party-change-table tbody tr:last-child td {
  border-bottom: 0;
}

.app-shell.elections-mode {
  grid-template-columns: minmax(0, 1fr);
}

.election-detail {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.election-import-notice {
  min-height: 68px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: 26px;
  padding: 15px 17px;
  color: var(--ink);
  background: #fff8e7;
  border: 1px solid #dfc984;
  border-left: 4px solid var(--gold);
}

.election-import-notice.status-filing_only {
  background: var(--blue-soft);
  border-color: #b7ccec;
  border-left-color: var(--blue);
}

.election-import-notice.status-missing_source,
.election-import-notice.status-unsupported_format {
  background: #fff0ed;
  border-color: #e5b8af;
  border-left-color: var(--red);
}

.election-import-notice svg {
  width: 21px;
  height: 21px;
  color: currentColor;
}

.election-import-notice strong,
.election-import-notice p {
  margin: 0;
}

.election-import-notice strong {
  font-size: 13px;
}

.election-import-notice p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.election-results-heading,
.election-contest > header,
.election-candidate {
  display: grid;
  align-items: center;
}

.election-results-heading {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
  gap: 24px;
  margin-bottom: 18px;
}

.election-results-heading h3,
.election-results-heading span {
  margin: 0;
}

.election-results-heading span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.election-contest-search {
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.election-contest-search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 126, 115, 0.12);
}

.election-contest-search svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.election-contest-search input {
  width: 100%;
  min-width: 0;
  padding: 11px 0;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
}

.election-contest-list {
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.election-contest + .election-contest {
  border-top: 3px solid var(--line-strong);
}

.election-contest > header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  min-height: 70px;
  padding: 14px 18px;
  background: #e8ebe6;
  border-bottom: 1px solid var(--line-strong);
}

.election-contest > header h3,
.election-contest > header p {
  margin: 0;
}

.election-contest > header h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
}

.election-contest > header h3 a {
  color: inherit;
}

.election-contest > header p,
.election-contest > header > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.election-contest > header > span {
  margin-top: 0;
  text-align: right;
}

.election-candidate {
  --timeline-fill: #ecefed;
  grid-template-columns: 24px minmax(180px, .9fr) minmax(220px, 1.3fr) 100px;
  gap: 12px;
  min-height: 64px;
  padding: 10px 18px;
  background-color: var(--timeline-fill);
  border-bottom: 1px solid var(--line);
}

.election-candidate:last-child {
  border-bottom: 0;
}

.election-candidate-outcome {
  display: grid;
  place-items: center;
  color: #98a29e;
}

.election-candidate-outcome svg {
  width: 17px;
  height: 17px;
}

.election-candidate.is-success .election-candidate-outcome {
  color: #9a6a09;
}

.election-candidate.is-loss .election-candidate-outcome {
  color: #aeb6b2;
}

.election-candidate-identity,
.election-result-number {
  min-width: 0;
}

.election-candidate-identity a,
.election-candidate-identity small,
.election-result-number small {
  display: block;
}

.election-candidate-identity a {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.election-candidate-identity small,
.election-result-number small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.election-result-track {
  width: 100%;
  height: 10px;
  display: block;
  overflow: hidden;
  appearance: none;
  background: #e1e6e1;
  border: 0;
  border-radius: 2px;
}

.election-result-track::-webkit-progress-bar {
  background: #e1e6e1;
}

.election-result-track::-webkit-progress-value {
  background: var(--teal);
}

.election-result-track::-moz-progress-bar {
  background: var(--teal);
}

.election-candidate.is-success .election-result-track::-webkit-progress-value {
  background: #b5841b;
}

.election-candidate.is-success .election-result-track::-moz-progress-bar {
  background: #b5841b;
}

.election-filing-label {
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

.election-result-number {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-align: right;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
}

.detail-grid div {
  min-width: 0;
}

.detail-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.contact-list,
.source-list,
.roster-list {
  display: grid;
  gap: 8px;
}

.contact-list a,
.contact-list .contact-record,
.source-list a {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.filing-contact-list small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.contact-list svg,
.source-list svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.private-contact {
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}

.private-contact h3 {
  color: var(--gold);
}

.source-meta {
  color: var(--muted);
  font-size: 11px;
}

.personal-timeline-shell {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 8px 0 4px;
}

.personal-timeline-shell:focus-visible {
  outline: 3px solid rgba(8, 126, 115, 0.28);
  outline-offset: 2px;
}

.personal-timeline {
  width: var(--personal-timeline-width);
  margin-inline: auto;
}

.personal-timeline-years {
  position: absolute;
  top: var(--personal-baseline);
  left: var(--personal-axis-padding);
  display: flex;
  width: var(--personal-year-span);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
}

.personal-year {
  position: relative;
  width: var(--personal-year-width);
  height: 32px;
  flex: 0 0 var(--personal-year-width);
}

.personal-year::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 1px;
  height: 9px;
  background: var(--line-strong);
}

.personal-year > span {
  position: absolute;
  top: 22px;
  left: 0;
  transform: translateX(-50%);
}

.personal-timeline-track {
  --personal-event-levels: 1;
  --personal-baseline: calc(36px + var(--personal-event-levels) * 30px);
  position: relative;
  width: var(--personal-timeline-width);
  height: calc(78px + var(--personal-event-levels) * 30px);
  min-height: 108px;
}

.personal-timeline-track::before {
  content: "";
  position: absolute;
  top: var(--personal-baseline);
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-strong);
}

.personal-service-box {
  --timeline-color: #3f4945;
  --timeline-fill: #ecefed;
  --timeline-accent: #9aa39e;
  position: absolute;
  top: calc(var(--personal-baseline) - 17px);
  z-index: 2;
  height: 34px;
  min-width: 1px;
  overflow: hidden;
  padding: 0 7px;
  color: var(--timeline-color);
  background-color: var(--timeline-fill);
  border-left: 3px solid var(--timeline-accent);
  text-decoration: none;
}

.personal-service-box strong {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  line-height: 34px;
}

.personal-service-box.is-current strong {
  font-weight: 700;
}

.personal-event-marker {
  --personal-event-level: 0;
  position: absolute;
  top: calc(var(--personal-baseline) - 48px - var(--personal-event-level) * 30px);
  z-index: 1;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.personal-event-marker::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: -1;
  width: 1px;
  height: calc(38px + var(--personal-event-level) * 30px);
  background: currentColor;
  pointer-events: none;
}

.personal-event-marker.is-success {
  color: var(--teal);
}

.personal-event-marker.is-loss {
  color: var(--red);
}

.personal-event-marker.is-resignation {
  color: var(--red);
}

.personal-event-marker.is-appointment {
  color: #8a5a00;
}

.personal-event-marker.is-death {
  color: #59636e;
}

.personal-event-marker.is-party-change {
  color: var(--timeline-color, #3f4945);
  background: var(--timeline-fill, #ecefed);
  border-color: var(--timeline-accent, #9aa39e);
  text-decoration: none;
}

.party-marker-monogram {
  color: var(--timeline-color, currentColor);
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.party-change-destination {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--timeline-color, inherit);
  font-weight: 600;
}

.party-change-destination > span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: var(--timeline-color, currentColor);
  background: var(--timeline-fill, #ecefed);
  border: 2px solid var(--timeline-accent, #9aa39e);
  border-radius: 50%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.party-change-table tr[id] {
  scroll-margin-top: 96px;
}

.personal-event-marker svg {
  width: 13px;
  height: 13px;
}

.timeline {
  display: grid;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item[id] {
  scroll-margin-top: 24px;
}

.timeline-elections .timeline-item.connects-election-round::before {
  content: "";
  position: absolute;
  top: 23px;
  bottom: 0;
  left: 13px;
  width: 1px;
  background: var(--line);
}

.timeline-marker {
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: #fff;
}

.timeline-marker svg {
  width: 17px;
  height: 17px;
}

.timeline-body {
  min-width: 0;
  padding-top: 3px;
}

.timeline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.timeline-heading strong,
.timeline-heading span,
.timeline-heading a {
  display: block;
}

.timeline-heading strong {
  font-size: 14px;
}

.timeline-heading span,
.timeline-heading a {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-organization {
  width: fit-content;
  text-decoration-color: transparent;
}

.timeline-organization:hover {
  color: var(--teal);
  text-decoration-color: currentColor;
}

.timeline-period,
.timeline-meta,
.timeline-note,
.timeline-link-note {
  margin: 7px 0 0;
  font-size: 12px;
}

.timeline-period {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.timeline-election-link {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.timeline-election-link:hover {
  color: var(--teal);
  text-decoration-color: currentColor;
}

.timeline-meta,
.timeline-note {
  color: var(--muted);
}

.timeline-note {
  line-height: 1.5;
}

.timeline-link-note {
  color: var(--teal);
  font-weight: 600;
}

.citation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 10px;
}

.citation-list a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--teal);
  font-size: 11px;
  text-decoration: none;
}

.citation-list a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.citation-list a small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.citation-list svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.roster-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.65fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  color: inherit;
  border-bottom: 1px solid #e8ebe7;
  text-decoration: none;
}

.roster-item:hover {
  background: rgba(255, 255, 255, 0.68);
}

.roster-item:last-child {
  border-bottom: 0;
}

.roster-item > span,
.roster-item strong,
.roster-item small,
.roster-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-item strong,
.roster-item small {
  display: block;
}

.roster-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.roster-item span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.roster-item > svg {
  width: 16px;
  height: 16px;
  color: #99a39f;
}

@media (max-width: 900px) {
  .query-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .query-presets button:nth-child(2) {
    border-right: 0;
  }

  .query-presets button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .query-clause {
    grid-template-columns: 92px minmax(0, 1fr) 34px;
  }

  .query-clause-fields {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }

  .query-metric-grid {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }

  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .record-row.person-row,
  .record-columns:not(.voter-columns) {
    grid-template-columns: 48px minmax(140px, 1fr) minmax(125px, 0.85fr) minmax(150px, 0.9fr) 24px;
  }

  .record-row.voter-row,
  .voter-columns {
    grid-template-columns: 48px minmax(150px, 1fr) minmax(140px, .9fr) minmax(90px, .55fr) 24px;
  }

  .voter-row .record-tertiary,
  .voter-columns > :nth-child(5) {
    display: none;
  }

  .record-row.organization-row {
    grid-template-columns: 48px minmax(170px, 1fr) minmax(160px, 0.9fr) 28px;
  }

  .record-row.election-row {
    grid-template-columns: 48px minmax(190px, 1fr) minmax(150px, .7fr) 28px;
  }

  .person-row .record-tertiary,
  .organization-row .record-tertiary,
  .election-row .record-tertiary,
  .record-columns > :nth-child(5) {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    gap: 8px;
    padding-inline: 18px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .workspace-switch a {
    padding-inline: 9px;
  }

  .workspace-switch a:first-child {
    font-size: 0;
  }

  .workspace-switch a:first-child::after {
    content: "Data";
    font-size: 11px;
  }

  .legislation-view {
    width: calc(100% - 28px);
    padding-top: 24px;
  }

  .legislation-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legislation-search {
    grid-column: 1 / -1;
  }

  .legislation-filter-actions {
    justify-content: flex-end;
  }

  .legislation-bill-row {
    grid-template-columns: 110px minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .legislation-committee-row {
    grid-template-columns: 130px minmax(0, 1fr) repeat(2, 64px) 18px;
    gap: 10px;
  }

  .legislation-member-row {
    grid-template-columns: 110px minmax(0, 1fr) repeat(2, 64px) 18px;
    gap: 10px;
  }

  .legislation-bill-meta {
    grid-column: 2;
  }

  .legislation-bill-row > svg {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .legislation-detail-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legislation-detail-grid aside {
    margin-top: 28px;
    padding-left: 0;
    border-left: 0;
  }

  .legislation-sponsor-list,
  .legislation-document-list,
  .legislation-member-list {
    grid-template-columns: 1fr;
  }

  .header-stats {
    display: none;
  }

  .status-link {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }

  .account-button {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .icon-button,
  .compact-button {
    width: 40px;
    height: 40px;
  }

  .command-button,
  .secondary-button,
  .danger-button {
    min-height: 42px;
  }

  .back-button {
    min-height: 44px;
  }

  .filter-toggle,
  .text-button {
    min-height: 40px;
  }

  .auth-options button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .query-builder-heading,
  .query-builder-body,
  .query-builder-footer {
    padding-inline: 16px;
  }

  .query-clause {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .query-clause-number {
    padding-top: 0;
  }

  .query-clause-fields {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .query-remove {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }

  .person-row .career-metrics {
    grid-column: 2 / 5;
  }

  .person-row:has(.career-metrics) > svg {
    grid-column: 5;
  }

  .topbar {
    min-height: 66px;
  }

  .header-stats div:nth-child(3) {
    display: none;
  }

  .status-link span {
    display: none;
  }

  .querybar {
    grid-template-columns: 1fr;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-button {
    min-width: 0;
    padding-inline: 8px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .filters:not(.is-expanded) {
    display: block;
    padding: 14px 18px;
  }

  .filters:not(.is-expanded) > :not(.filter-heading),
  .filters:not(.is-expanded) #clear-filters {
    display: none;
  }

  .filters:not(.is-expanded) .filter-heading {
    margin-bottom: 0;
  }

  .filter-heading,
  .privacy-note {
    grid-column: 1 / -1;
  }

  .filter-control {
    margin-top: 0;
  }

  .privacy-note {
    margin-top: 2px;
  }
}

@media (max-width: 540px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .query-builder-heading h2 {
    font-size: 17px;
  }

  .query-presets,
  .query-clause-fields,
  .query-metric-grid {
    grid-template-columns: 1fr;
  }

  .query-presets button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .query-wide-field {
    grid-column: auto;
  }

  .query-builder-footer {
    align-items: flex-start;
  }

  .query-builder-footer p {
    max-width: 42%;
  }

  .person-row .career-metrics {
    grid-column: 2;
    flex-wrap: wrap;
    gap: 3px 10px;
  }

  .person-row:has(.career-metrics) > svg {
    grid-column: 3;
  }

  .header-stats {
    display: none;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .workspace-switch a {
    min-height: 32px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .legislation-heading,
  .legislation-toolbar,
  .legislation-bill-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .legislation-heading h1 {
    font-size: 27px;
  }

  .legislation-filters {
    grid-template-columns: 1fr;
  }

  .legislation-search {
    grid-column: auto;
  }

  .legislation-filter-actions {
    justify-content: stretch;
  }

  .legislation-filter-actions .command-button {
    flex: 1;
  }

  .legislation-bill-row {
    grid-template-columns: minmax(0, 1fr) 18px;
    padding: 14px;
  }

  .legislation-committee-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, 52px) 18px;
    padding: 14px;
  }

  .legislation-committee-row .legislation-bill-number,
  .legislation-committee-row .legislation-bill-main {
    grid-column: 1;
  }

  .legislation-committee-row .legislation-committee-count {
    grid-row: 1 / 3;
  }

  .legislation-committee-row > svg {
    grid-row: 1 / 3;
  }

  .legislation-member-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, 52px) 18px;
    padding: 14px;
  }

  .legislation-member-row .legislation-member-district,
  .legislation-member-row .legislation-bill-main {
    grid-column: 1;
  }

  .legislation-member-row .legislation-committee-count,
  .legislation-member-row > svg {
    grid-row: 1 / 3;
  }

  .legislation-member-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tracking-row-link {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 14px 54px 14px 14px;
  }

  .tracking-row-icon {
    grid-row: 1 / 3;
  }

  .tracking-row-main {
    grid-column: 2;
  }

  .tracking-row-metrics {
    grid-column: 2;
    justify-content: flex-start;
  }

  .tracking-row-metrics > span {
    min-width: 0;
    text-align: left;
  }

  .tracking-row-state {
    grid-column: 2;
    padding: 7px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .tracking-row-link > svg {
    grid-column: 3;
    grid-row: 1 / 4;
  }

  .tracking-updates > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .tracking-update {
    grid-template-columns: 8px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 12px 14px;
  }

  .tracking-update time {
    grid-column: 2;
  }

  .tracking-update > svg {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .legislation-meeting-list > a {
    grid-template-columns: 1fr 18px;
  }

  .legislation-meeting-list time,
  .legislation-meeting-list span {
    grid-column: 1;
  }

  .legislation-meeting-list svg {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .legislation-bill-number,
  .legislation-bill-main,
  .legislation-bill-meta {
    grid-column: 1;
  }

  .legislation-bill-row > svg {
    grid-column: 2;
    grid-row: 1 / 4;
  }

  .legislation-detail-nav > span {
    display: none;
  }

  .legislation-timeline li {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .legislation-vote-list summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .legislation-vote-list .vote-result {
    grid-column: 1;
  }

  .legislation-vote-list summary > svg {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .vote-position-groups {
    grid-template-columns: 1fr;
  }

  .roll-call-position-groups {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    gap: 4px;
  }

  .status-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-freshness {
    grid-template-columns: 1fr;
  }

  .status-summary-item {
    min-height: 92px;
    border-bottom: 1px solid var(--line);
  }

  .status-summary-item:nth-child(2n) {
    border-right: 0;
  }

  .status-heading {
    grid-template-columns: 1fr;
  }

  .status-heading h1 {
    font-size: 25px;
  }

  .conflict-summary {
    grid-template-columns: 1fr;
  }

  .conflict-summary .status-summary-item {
    border-right: 0;
  }

  .conflict-issue-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .conflict-term-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .conflict-term-row > span:nth-child(2) {
    grid-column: 1;
  }

  .conflict-term-row > button {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .report-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .report-row > .secondary-button {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .report-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .records-heading {
    align-items: flex-start;
  }

  .records-heading-actions {
    display: grid;
    justify-items: end;
  }

  .editor-fields {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding-top: 18px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .filter-heading,
  .privacy-note {
    grid-column: auto;
  }

  .records {
    padding: 16px;
  }

  .record-row {
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    gap: 12px;
  }

  .record-row.election-row {
    grid-template-columns: 44px minmax(0, 1fr) 24px;
  }

  .election-row .record-secondary {
    display: none;
  }

  .election-detail {
    width: min(100% - 28px, 1180px);
  }

  .election-results-heading,
  .election-contest > header {
    grid-template-columns: 1fr;
  }

  .election-results-heading {
    gap: 12px;
  }

  .election-contest > header {
    gap: 5px;
  }

  .election-contest > header > span {
    text-align: left;
  }

  .election-candidate {
    grid-template-columns: 20px minmax(0, 1fr) 72px;
    gap: 8px;
    padding: 11px 12px;
  }

  .election-result-visual {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .election-result-number {
    grid-column: 3;
    grid-row: 1;
  }

  .record-columns {
    display: block;
    min-height: 40px;
    padding-left: 56px;
  }

  .record-columns > span {
    display: none !important;
  }

  .record-columns > span:nth-child(2) {
    display: flex !important;
    min-height: 40px;
    align-items: center;
  }

  .sort-button {
    gap: 3px;
    font-size: 9px;
  }

  .person-row .record-position,
  .record-secondary,
  .record-tertiary {
    display: none;
  }

  .avatar,
  .organization-symbol {
    width: 42px;
    height: 42px;
  }

  .detail-header {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
  }

  .detail-header .avatar,
  .detail-header .organization-symbol {
    width: 58px;
    height: 58px;
  }

  .detail-name-row {
    flex-wrap: wrap;
  }

  .detail-name-row h2 {
    flex: 1 0 100%;
  }

  .detail-header-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .timeline-heading {
    display: grid;
  }

  .timeline-heading .badge-line {
    justify-content: flex-start;
  }

  .citation-list {
    display: grid;
  }

  .roster-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .roster-item span {
    text-align: left;
  }

  .roster-table {
    overflow: visible;
  }

  .roster-table-header {
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .roster-table-header > span {
    padding: 4px;
  }

  .roster-table-header .sort-button {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    font-size: 8px;
  }

  .roster-table-row {
    min-width: 0;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 5px 12px;
    padding: 12px;
  }

  .roster-table-row > span {
    padding: 0;
  }

  .roster-table-row .roster-person {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 48px;
  }

  .roster-table-row > span:not(.roster-person) {
    grid-column: 2;
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
  }

  .roster-table-row > span:nth-child(2)::before,
  .roster-table-row > span:nth-child(3)::before,
  .roster-table-row > span:nth-child(4)::before {
    flex: 0 0 48px;
    color: var(--muted);
    font: 600 8px "IBM Plex Mono", monospace;
    text-transform: uppercase;
  }

  .roster-table-row > span:nth-child(2)::before { content: "Position"; }
  .roster-table-row > span:nth-child(3)::before { content: "District"; }
  .roster-table-row > span:nth-child(4)::before { content: "Status"; }

  .status-table {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .status-table-header {
    display: none;
  }

  .status-table-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    margin-bottom: 10px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    border-radius: 6px;
  }

  .status-table-row > span:nth-child(1),
  .status-table-row > span:nth-child(2) {
    grid-column: 1 / -1;
  }

  .status-table-row > span:nth-child(3)::before,
  .status-table-row > span:nth-child(4)::before,
  .status-table-row > span:nth-child(5)::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font: 600 8px "IBM Plex Mono", monospace;
    text-transform: uppercase;
  }

  .status-table-row > span:nth-child(3)::before { content: "Type"; }
  .status-table-row > span:nth-child(4)::before { content: "Races"; }
  .status-table-row > span:nth-child(5)::before { content: "Candidates"; }

  .status-table-row > span:nth-child(6) {
    grid-column: 2;
    grid-row: 3 / 5;
    align-self: end;
  }
}

@media (max-width: 640px) {
  .querybar,
  .mode-switch,
  .search-field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .mode-switch {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mode-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .workbench-tabs button {
    gap: 4px;
    padding-inline: 4px;
    font-size: 10px;
  }

  .workbench-tabs button span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .brand > span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
