:root {
  --navy: #07385f;
  --navy-deep: #06283f;
  --navy-ink: #041d2e;
  --teal: #187b72;
  --teal-soft: #e8f4f1;
  --gold: #a77b2f;
  --gold-soft: #f7f0df;
  --coral: #b65343;
  --coral-soft: #f9ebe8;
  --blue: #2e6f9e;
  --blue-soft: #e9f1f7;
  --ink: #172433;
  --muted: #657383;
  --line: #d7dfe5;
  --line-strong: #bdc9d1;
  --paper: #f5f7f8;
  --surface: #ffffff;
  --shadow: 0 15px 34px rgba(6, 40, 63, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

button,
a,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

#money-map,
#connections,
#activity,
#sources {
  scroll-margin-top: 104px;
}

.entity-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 8px max(20px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(6, 40, 63, 0.16);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.entity-brand {
  display: flex;
  width: 76px;
  height: 66px;
  align-items: center;
}

.entity-brand img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 64px;
}

.entity-region {
  margin-left: 18px;
  color: var(--navy-deep);
  font-size: 1.1rem;
  font-weight: 850;
}

.entity-nav {
  display: flex;
  gap: 5px;
  margin-left: auto;
  color: #41505e;
  font-size: 0.87rem;
  font-weight: 750;
}

.entity-nav a {
  border-radius: 5px;
  padding: 9px 11px;
}

.entity-nav a:hover,
.entity-nav a:focus-visible {
  color: var(--navy);
  background: var(--gold-soft);
  outline: none;
}

.entity-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--navy-deep);
}

.entity-intro::before,
.entity-intro::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.entity-intro::before {
  inset: 0 0 0 auto;
  width: 48%;
  opacity: 0.26;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.12) 50%) 0 0 /
      52px 52px,
    linear-gradient(rgba(255, 255, 255, 0.12) 49%, transparent 50%) 0 0 / 52px 52px;
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}

.entity-intro::after {
  right: -120px;
  bottom: -230px;
  width: 520px;
  height: 520px;
  border: 78px solid rgba(242, 206, 131, 0.09);
  border-radius: 50%;
}

.entity-intro-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: center;
  gap: 68px;
  width: min(1240px, calc(100% - 40px));
  min-height: 380px;
  margin: 0 auto;
  padding: 50px 0 56px;
}

.entity-intro-copy {
  min-width: 0;
}

.entity-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.76rem;
  font-weight: 750;
}

.entity-breadcrumbs a:hover,
.entity-breadcrumbs a:focus-visible {
  color: #fff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entity-kicker {
  margin: 0 0 9px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.entity-intro .entity-kicker {
  color: #f2ce83;
}

.entity-intro h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.35rem, 4.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.entity-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.entity-identity span {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 4px;
  padding: 5px 9px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(4, 29, 46, 0.38);
  font-size: 0.74rem;
  font-weight: 780;
}

.committee-official-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.committee-official-link:hover {
  text-decoration-thickness: 2px;
}

.committee-official-link:focus-visible {
  border-radius: 2px;
  outline: 2px solid #f2ce83;
  outline-offset: 3px;
}

.entity-identity .committee-official-link {
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.quick-read .committee-official-link {
  color: #fff;
}

.entity-explainer {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.95rem;
  line-height: 1.58;
}

.entity-description-source {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.69rem;
}

.entity-description-source a {
  color: #f2ce83;
  font-weight: 800;
}

.entity-description-source a:hover,
.entity-description-source a:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quick-read {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 24px;
  background: rgba(4, 29, 46, 0.72);
  box-shadow: 0 20px 45px rgba(0, 13, 22, 0.22);
}

.quick-read::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 4px;
  border-radius: 7px 0 4px;
  content: "";
  background: #f2ce83;
}

.quick-read-label {
  margin: 0;
  color: #f2ce83;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-read dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 18px;
  margin: 21px 0;
}

.quick-read dl > div:last-child {
  grid-column: 1 / -1;
}

.quick-read dt {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-read dd {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 830;
}

.quick-read > p:last-child {
  margin: 0;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.73rem;
  line-height: 1.5;
}

.entity-summary {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1240px, calc(100% - 40px));
  margin: -1px auto 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(6, 40, 63, 0.04);
}

.summary-item {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 24px 25px 21px;
  border-right: 1px solid var(--line);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item::before {
  position: absolute;
  top: 0;
  right: 25px;
  left: 25px;
  height: 3px;
  content: "";
  background: var(--line-strong);
}

.summary-in::before {
  background: var(--teal);
}

.summary-out::before {
  background: var(--coral);
}

.summary-independent::before {
  background: var(--gold);
}

.summary-item > span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  margin-top: 7px;
  color: var(--navy-deep);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  letter-spacing: -0.025em;
}

.summary-item small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.35;
}

.entity-page {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  gap: 54px;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 76px;
}

.profile-rail {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 14px;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 22px;
  background: var(--surface);
}

.profile-card h2 {
  margin: 0;
  color: var(--navy-deep);
  font-size: 1.08rem;
  line-height: 1.25;
}

.profile-facts {
  margin: 20px 0 0;
}

.profile-facts > div {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.profile-facts dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-info {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  text-transform: none;
}

.profile-info-button {
  display: inline-grid;
  width: 18px;
  height: 18px;
  min-height: 0;
  place-items: center;
  border: 1px solid #9eb0bc;
  border-radius: 50%;
  padding: 0;
  color: var(--navy);
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.profile-info-button:hover,
.profile-info-button:focus-visible {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
  outline: none;
}

.profile-info-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(167, 123, 47, 0.24);
}

.profile-info-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: -8px;
  width: 255px;
  max-width: calc(100vw - 52px);
  padding: 11px 12px;
  border: 1px solid #b8c6cf;
  border-radius: 6px;
  color: #fff;
  background: var(--navy-ink);
  box-shadow: 0 12px 28px rgba(4, 29, 46, 0.2);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.72rem;
  font-weight: 580;
  letter-spacing: 0;
  line-height: 1.48;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translateY(-3px);
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 120ms ease;
  visibility: hidden;
}

.profile-info-popover::before {
  position: absolute;
  top: -5px;
  left: 12px;
  width: 9px;
  height: 9px;
  border-top: 1px solid #b8c6cf;
  border-left: 1px solid #b8c6cf;
  content: "";
  background: var(--navy-ink);
  transform: rotate(45deg);
}

.profile-info:hover .profile-info-popover,
.profile-info:focus-within .profile-info-popover {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.profile-facts dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 730;
  line-height: 1.42;
}

.coverage-card p:last-child {
  margin: 13px 0 0;
  color: #536271;
  font-size: 0.77rem;
  line-height: 1.55;
}

.coverage-card {
  border-left: 3px solid var(--teal);
}

.entity-main {
  min-width: 0;
}

.entity-section {
  padding: 0 0 64px;
}

.entity-section + .entity-section {
  padding-top: 58px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 16px;
}

.section-heading h2 {
  max-width: 720px;
  margin: 0;
  color: var(--navy-deep);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.section-note {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: right;
}

.section-intro {
  max-width: 720px;
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.flow-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 19px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.flow-filter {
  min-height: 35px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 6px 11px;
  color: #4e5f6e;
  background: #fff;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
}

.flow-filter:hover,
.flow-filter:focus-visible {
  border-color: var(--navy);
  color: var(--navy);
  outline: none;
}

.flow-filter.is-active {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.target-list {
  display: grid;
  gap: 11px;
}

.target-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.target-card > summary::-webkit-details-marker {
  display: none;
}

.target-card-summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.target-card-summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.target-card[open] {
  border-color: #98aab6;
  box-shadow: var(--shadow);
}

.target-card:hover {
  border-color: #aab9c3;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.target-card-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 20px 21px 17px;
}

.race-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #cbd7de;
  border-radius: 6px;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 1.18rem;
  font-weight: 900;
}

.target-name {
  min-width: 0;
}

.target-name > strong {
  display: block;
  color: var(--navy-deep);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.3;
}

.target-name > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.target-election-date {
  display: block;
  margin-top: 7px;
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 780;
}

.target-total {
  display: grid;
  align-content: center;
  justify-items: end;
  color: var(--navy-deep);
  font-size: 1.1rem;
  font-weight: 870;
  white-space: nowrap;
}

.target-total small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 650;
}

.flow-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #f9fbfc;
}

.flow-lane {
  min-width: 0;
  padding: 13px 17px 14px;
  border-right: 1px solid var(--line);
}

.flow-lane:last-child {
  border-right: 0;
}

.flow-lane.is-zero {
  opacity: 0.48;
}

.flow-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.65rem;
  line-height: 1.2;
}

.flow-lane-head span {
  color: var(--muted);
  font-weight: 820;
  text-transform: uppercase;
}

.flow-lane-head strong {
  color: var(--ink);
}

.flow-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8eb;
}

.flow-track span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
}

.flow-lane-in .flow-track span {
  background: var(--teal);
}

.flow-lane-out .flow-track span {
  background: var(--coral);
}

.flow-lane-independent .flow-track span {
  background: var(--gold);
}

.target-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 21px 17px;
}

.target-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
}

.target-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 3px;
  padding: 3px 7px;
  color: #53616e;
  background: #edf1f3;
  font-size: 0.64rem;
  font-weight: 760;
}

.target-tag.support {
  color: #49652f;
  background: #eef3e8;
}

.target-tag.oppose {
  color: #8b3d32;
  background: var(--coral-soft);
}

.target-expand-hint {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 850;
}

.target-expand-hint b {
  font-size: 0.95rem;
  transition: transform 140ms ease;
}

.target-card[open] .target-expand-hint b {
  transform: rotate(180deg);
}

.target-records {
  border-top: 1px solid var(--line);
  padding: 18px 21px 21px;
  background: #fff;
}

.target-record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.target-record-heading strong {
  display: block;
  color: var(--navy-deep);
  font-size: 0.78rem;
}

.target-record-heading small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
}

.target-record-heading a {
  color: var(--navy);
  font-size: 0.69rem;
  font-weight: 820;
}

.target-record-heading a:hover,
.target-record-heading a:focus-visible {
  color: var(--teal);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.target-record-list {
  border-top: 1px solid var(--line);
}

.target-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 13px;
  align-items: center;
  min-height: 54px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}

.target-record-row > span strong,
.target-record-row > span small {
  display: block;
}

.target-record-row > span strong {
  color: var(--ink);
  font-size: 0.73rem;
}

.target-record-row > span small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.target-record-row > strong {
  color: var(--navy-deep);
  font-size: 0.75rem;
}

.target-record-row > a {
  color: var(--navy);
  font-weight: 900;
}

.target-record-more,
.target-record-empty {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.connections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.connection-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.connection-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 96px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfc;
}

.connection-symbol {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-size: 1.03rem;
  font-weight: 900;
}

.connection-panel-heading p {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.63rem;
  font-weight: 880;
  text-transform: uppercase;
}

.connection-panel-heading h3 {
  margin: 0;
  color: var(--navy-deep);
  font-size: 0.95rem;
  line-height: 1.28;
}

.association-list,
.similar-list {
  display: grid;
  padding: 7px 20px;
}

.association-item,
.similar-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.association-item:last-child,
.similar-item:last-child {
  border-bottom: 0;
}

.association-item strong,
.similar-item strong {
  display: block;
  color: var(--navy-deep);
  font-size: 0.8rem;
  line-height: 1.32;
}

.association-item small,
.similar-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.36;
}

.association-type {
  align-self: start;
  border-radius: 3px;
  padding: 4px 6px;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 0.59rem;
  font-weight: 850;
  text-transform: uppercase;
}

.similar-item:hover strong,
.similar-item:focus-visible strong {
  color: var(--navy);
}

.similar-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.similar-score {
  display: grid;
  width: 51px;
  height: 51px;
  place-items: center;
  border: 4px solid var(--teal-soft);
  border-radius: 50%;
  color: var(--teal);
  font-size: 0.69rem;
  font-weight: 900;
}

.similar-method {
  margin: 0;
  padding: 13px 20px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.45;
}

.activity-heading {
  align-items: start;
}

.activity-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(145px, 1fr) minmax(145px, 1fr);
  gap: 9px;
  width: min(560px, 100%);
}

.activity-filter {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.activity-filter span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
}

.activity-filter select {
  min-height: 41px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 7px 34px 7px 10px;
  color: var(--ink);
  background: #fff;
}

.activity-filter select:focus-visible {
  border-color: var(--navy);
  outline: 2px solid rgba(7, 56, 95, 0.15);
}

.activity-range-note {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.activity-list {
  border-top: 1px solid var(--line);
}

.activity-row {
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.activity-row > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 110px 18px;
  gap: 16px;
  align-items: center;
  min-height: 77px;
  padding: 13px 4px;
  cursor: pointer;
}

.activity-row > summary::-webkit-details-marker {
  display: none;
}

.activity-row > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.activity-primary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.activity-primary strong {
  color: var(--navy-deep);
  font-size: 0.83rem;
  line-height: 1.3;
}

.activity-primary small,
.activity-date {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.activity-direction {
  display: inline-flex;
  width: max-content;
  min-height: 21px;
  align-items: center;
  border-radius: 3px;
  padding: 3px 6px;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 0.57rem;
  font-weight: 880;
  text-transform: uppercase;
}

.activity-direction.money-in {
  color: var(--teal);
  background: var(--teal-soft);
}

.activity-direction.money-out {
  color: var(--coral);
  background: var(--coral-soft);
}

.activity-direction.independent {
  color: #7e5b1e;
  background: var(--gold-soft);
}

.activity-amount {
  color: var(--navy-deep);
  font-size: 0.87rem;
  text-align: right;
}

.activity-chevron {
  color: var(--muted);
  text-align: center;
  transition: transform 140ms ease;
}

.activity-row[open] .activity-chevron {
  transform: rotate(180deg);
}

.activity-detail {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.1fr;
  gap: 24px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  padding: 19px 20px 21px;
  background: #fff;
}

.activity-detail > div {
  display: grid;
  align-content: start;
  gap: 5px;
}

.activity-detail span {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 850;
  text-transform: uppercase;
}

.activity-detail strong {
  font-size: 0.76rem;
  line-height: 1.45;
}

.activity-detail small {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.4;
}

.activity-detail a {
  width: max-content;
  max-width: 100%;
  margin-top: 3px;
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 820;
}

.activity-detail a:hover,
.activity-detail a:focus-visible {
  color: var(--teal);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 4px;
}

.activity-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.71rem;
}

.activity-footer button {
  min-height: 35px;
  border: 1px solid var(--navy);
  border-radius: 4px;
  padding: 7px 11px;
  color: var(--navy);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 820;
  cursor: pointer;
}

.activity-footer button:hover,
.activity-footer button:focus-visible {
  color: #fff;
  background: var(--navy);
  outline: none;
}

.sources-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 34px;
}

.sources-layout h3 {
  margin: 0 0 13px;
  color: var(--navy-deep);
  font-size: 0.94rem;
}

.source-list {
  display: grid;
  gap: 9px;
}

.source-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.source-group > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 83px;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
}

.source-group > summary::-webkit-details-marker {
  display: none;
}

.source-group > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
}

.source-group[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f9fbfc;
}

.source-seal {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 0.9rem;
  font-weight: 900;
}

.source-agency small,
.source-agency strong,
.source-agency span {
  display: block;
}

.source-agency small {
  margin-bottom: 2px;
  color: var(--gold);
  font-size: 0.59rem;
  font-weight: 880;
  text-transform: uppercase;
}

.source-agency strong {
  color: var(--navy-deep);
  font-size: 0.79rem;
}

.source-agency span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
}

.source-group-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.67rem;
  font-weight: 820;
  white-space: nowrap;
}

.source-group-count b {
  font-size: 0.95rem;
  transition: transform 140ms ease;
}

.source-group[open] .source-group-count b {
  transform: rotate(180deg);
}

.source-documents {
  padding: 0 16px 6px;
}

.source-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.source-item strong {
  display: block;
  color: var(--navy-deep);
  font-size: 0.75rem;
}

.source-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.source-item a {
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 820;
}

.source-item a:hover,
.source-item a:focus-visible {
  color: var(--teal);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.method-note {
  border-top: 4px solid var(--gold);
  padding: 20px 21px;
  background: var(--gold-soft);
}

.method-note strong {
  color: var(--navy-deep);
  font-size: 0.82rem;
}

.method-note p {
  margin: 10px 0 0;
  color: #566370;
  font-size: 0.72rem;
  line-height: 1.55;
}

.entity-empty {
  min-height: 116px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 30px;
  color: var(--muted);
  background: #fafcfc;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.compact-empty {
  min-height: 92px;
  border: 0;
  padding: 27px 10px;
  background: transparent;
}

.entity-error {
  width: min(720px, calc(100% - 40px));
  margin: 50px auto;
  border: 1px solid #e1c0ba;
  border-radius: 6px;
  padding: 24px;
  color: #783a31;
  background: var(--coral-soft);
}

.entity-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 25px max(20px, calc((100vw - 1240px) / 2));
  color: rgba(255, 255, 255, 0.72);
  background: var(--navy-deep);
  font-size: 0.75rem;
}

.entity-footer span:nth-child(2) {
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
}

.entity-footer a {
  justify-self: end;
  color: #fff;
  font-weight: 820;
}

.entity-footer a:hover,
.entity-footer a:focus-visible {
  color: #f2ce83;
  outline: none;
}

@media (max-width: 1080px) {
  .entity-intro-inner {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
  }

  .entity-page {
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 32px;
  }

  .connections-grid {
    grid-template-columns: 1fr;
  }

  .activity-heading {
    display: grid;
    align-items: start;
  }

  .activity-controls {
    width: 100%;
  }

  .entity-nav a:nth-child(3) {
    display: none;
  }
}

@media (max-width: 860px) {
  .entity-header {
    min-height: 72px;
  }

  .entity-brand {
    width: 64px;
    height: 56px;
  }

  .entity-region {
    font-size: 0.95rem;
  }

  .entity-nav a:not(:first-child) {
    display: none;
  }

  .entity-intro-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 40px 0 44px;
  }

  .entity-breadcrumbs {
    margin-bottom: 26px;
  }

  .quick-read {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1.1fr;
    gap: 20px;
    align-items: center;
  }

  .quick-read dl {
    margin: 14px 0 0;
  }

  .quick-read > p:last-child {
    padding: 0 0 0 20px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
  }

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

  .summary-item:nth-child(2) {
    border-right: 0;
  }

  .summary-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .entity-page {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

  .profile-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-card {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .entity-header,
  .entity-intro-inner,
  .entity-summary,
  .entity-page {
    width: auto;
  }

  .entity-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .entity-brand {
    width: 58px;
  }

  .entity-region {
    margin-left: 11px;
    font-size: 0.82rem;
  }

  .entity-nav {
    font-size: 0.75rem;
  }

  .entity-nav a {
    padding: 7px;
  }

  .entity-intro-inner {
    width: calc(100% - 32px);
  }

  .entity-intro h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  .entity-explainer {
    font-size: 0.86rem;
  }

  .quick-read {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .quick-read > p:last-child {
    padding: 15px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .entity-summary {
    width: calc(100% - 32px);
  }

  .summary-item {
    min-height: 126px;
    padding: 21px 18px 18px;
  }

  .summary-item::before {
    right: 18px;
    left: 18px;
  }

  .summary-item strong {
    font-size: 1.32rem;
  }

  .entity-page {
    width: calc(100% - 32px);
    gap: 40px;
    padding-bottom: 52px;
  }

  .profile-rail {
    grid-template-columns: 1fr;
  }

  .entity-section {
    padding-bottom: 48px;
  }

  .entity-section + .entity-section {
    padding-top: 44px;
  }

  .section-heading {
    display: grid;
    align-items: start;
    gap: 12px;
  }

  .section-note {
    text-align: left;
  }

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

  .target-card-main {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 17px 17px 14px;
  }

  .target-total {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .flow-lanes {
    grid-template-columns: 1fr;
  }

  .flow-lane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flow-lane:last-child {
    border-bottom: 0;
  }

  .target-card-footer {
    display: grid;
    padding: 0 17px 16px;
  }

  .target-expand-hint {
    justify-self: start;
  }

  .target-records {
    padding: 16px 17px 18px;
  }

  .target-record-heading {
    display: grid;
  }

  .target-record-row {
    grid-template-columns: minmax(0, 1fr) auto 18px;
  }

  .connection-panel-heading {
    min-height: 0;
  }

  .activity-filter {
    width: 100%;
  }

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

  .activity-type-filter {
    grid-column: 1 / -1;
  }

  .activity-row {
    margin-bottom: 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
  }

  .activity-row > summary {
    grid-template-columns: minmax(0, 1fr) auto 18px;
    grid-template-rows: auto auto;
    gap: 9px 11px;
    padding: 13px;
  }

  .activity-primary {
    grid-column: 1 / 3;
  }

  .activity-date {
    grid-column: 1;
    grid-row: 2;
  }

  .activity-amount {
    grid-column: 2;
    grid-row: 2;
  }

  .activity-chevron {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .activity-detail {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0;
    border-width: 1px 0 0;
    border-left: 0;
    padding: 17px 13px 19px;
    background: #f9fbfc;
  }

  .activity-footer {
    display: grid;
  }

  .activity-footer button {
    justify-self: start;
  }

  .sources-layout {
    grid-template-columns: 1fr;
  }

  .source-item {
    grid-template-columns: 1fr;
  }

  .source-group > summary {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .source-group-count {
    grid-column: 2;
    justify-self: start;
  }

  .entity-footer {
    grid-template-columns: 1fr auto;
  }

  .entity-footer span:nth-child(2) {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
