:root {
  --paper: #f4f0e7;
  --panel: #fbf8f2;
  --ink: #1c1915;
  --muted: #5e574e;
  --line: #d8d0c3;
  --passed: #1d6b43;
  --progress: #9a5b10;
  --none: #6d675e;
  --chip: #fffdf9;
  --focus: #1c1915;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, #efe6d4 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
}

a { color: #1d4f36; }
a:hover { color: #143828; }

.site-header,
main,
.guide,
.site-footer {
  width: min(1720px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header { padding: 2.25rem 0 0.5rem; }

.kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--progress);
}

h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 1.15rem 0 0;
  border-bottom: 1px solid var(--line);
}

.view-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.45rem 0.85rem 0.5rem;
  cursor: pointer;
}

.view-tab:hover { color: var(--ink); }

.view-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--passed);
}

#tab-guide,
#tab-guide:hover,
#tab-guide[aria-selected="true"] {
  color: #e10600;
}

#tab-guide[aria-selected="true"] {
  border-bottom-color: #e10600;
}

body[data-view="guide"] #map-lede,
body[data-view="directory"] #map-lede,
body[data-view="history"] #map-lede,
body[data-view="research"] #map-lede { display: none; }

.lede {
  max-width: 42rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.petition-banner {
  display: block;
  margin: 1rem 0 0;
  padding: 0.9rem 1.15rem;
  background: #e10600;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.petition-banner:hover,
.petition-banner:focus-visible {
  background: #c10500;
  color: #fff;
  text-decoration: underline;
}

.guide-body {
  max-width: 42rem;
  padding-bottom: 0.5rem;
}

.cta-blurb p {
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
}

.cta-blurb p:last-child { margin-bottom: 0; }

.cta-steps {
  margin: 1.35rem 0 0;
  padding: 0 0 0 1.4rem;
  font-size: 1.12rem;
}

.cta-steps li {
  margin: 0.4rem 0;
  padding-left: 0.2rem;
}

.cta-steps li::marker {
  color: var(--progress);
  font-weight: 700;
}

.guide-rules {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  counter-reset: guide;
}

.guide-rules li {
  counter-increment: guide;
  padding: 0.95rem 0 1rem;
  border-top: 1px solid var(--line);
}

.guide-rules h2 {
  margin: 0;
  font-size: 1.35rem;
}

.guide-rules h2::before {
  content: counter(guide) ". ";
  color: var(--progress);
}

.guide-rules p {
  margin: 0.4rem 0 0;
}

.guide-next {
  margin: 1.15rem 0 0.55rem;
}

.guide-back {
  border: 0;
  background: none;
  padding: 0;
  color: #1d4f36;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.guide-back:hover { color: #143828; }

.advocate-list {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
}

.advocate-list li {
  padding: 0.95rem 0 1rem;
  border-top: 1px solid var(--line);
}

.advocate-list > li > a {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 560;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.advocate-list p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.advocate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  font-weight: 700;
}

.advocate-links a {
  font-size: 1rem;
}

.directory-section {
  margin-top: 1.8rem;
}

.directory-section h2 {
  margin: 0;
  font-size: 1.55rem;
}

.totals { margin: 0.25rem 0 1.75rem; }

.totals-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.total-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.8rem 1rem 0.95rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.total-card:hover,
.total-card:focus-visible {
  border-color: var(--ink);
  background: #fff;
}

.total-label {
  display: block;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.total-value {
  display: block;
  margin: 0.2rem 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.total-value.passed { color: var(--passed); }
.total-value.progress { color: var(--progress); }
.total-value.none { color: var(--none); }

.totals-dialog {
  width: min(46rem, calc(100vw - 2rem));
  max-height: min(85vh, 44rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.totals-dialog::backdrop {
  background: rgba(28, 25, 21, 0.48);
}

.totals-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.totals-dialog-head h2 { font-size: 1.55rem; }

.dialog-close {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  flex: none;
}

.dialog-close:hover { border-color: var(--ink); }

.totals-dialog-body {
  overflow: auto;
  max-height: calc(85vh - 5.2rem);
  padding: 0.95rem 1rem 1.15rem;
}

.modal-lead {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.modal-group { margin: 0 0 1rem; }
.modal-group:last-child { margin-bottom: 0; }

.modal-group h3 {
  margin: 0 0 0.45rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: 0;
  text-transform: none;
}

.modal-count {
  color: var(--muted);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.modal-bills {
  list-style: none;
  margin: 0;
  padding: 0;
}

.modal-bills li {
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.modal-bills li:first-child {
  border-top: 0;
  padding-top: 0;
}

.modal-bills h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: 0;
  text-transform: none;
}

.modal-bills p { margin: 0.3rem 0 0; }
.modal-bills .meta { color: var(--muted); }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill {
  border: 1px solid var(--line);
  background: var(--chip);
  padding: 0.18rem 0.55rem;
  font-size: 0.9rem;
}

.pill-id {
  margin-left: 0.35rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
}

.totals-note {
  max-width: 46rem;
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(16rem, 48rem) auto;
  gap: 1.5rem;
  align-items: start;
  margin: 1.6rem 0 1.1rem;
}

.bill-picker label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

select {
  width: 100%;
  appearance: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231c1915' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") right 0.9rem center no-repeat;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 2.4rem 0.75rem 0.85rem;
}

select:focus-visible,
button:focus-visible,
.map-svg path:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.bill-summary {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: start;
  justify-content: flex-end;
}

.legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0.45rem 0.7rem 0.45rem 0.5rem;
  cursor: pointer;
}

.legend-btn[aria-pressed="true"] {
  border-color: var(--ink);
  background: #fff;
}

.swatch {
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid rgba(28, 25, 21, 0.25);
  flex: none;
}

.swatch-passed { background: var(--passed); border-color: var(--passed); }
.swatch-progress {
  background: repeating-linear-gradient(-45deg, #e0a04a, #e0a04a 3px, #f6e2c0 3px, #f6e2c0 6px);
}
.swatch-none { background: #ddd6c8; }

.count {
  min-width: 1.4rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.map-panel,
.detail,
.list-block {
  background: var(--panel);
  border: 1px solid var(--line);
}

.map-panel { padding: 0.85rem 0.9rem 0.7rem; }

.map-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.map-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.map-nav {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  cursor: pointer;
}

.map-nav:hover { border-color: var(--ink); }

h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 560;
}

.hover-readout {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
  flex: none;
}

.map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.map-svg path {
  stroke: #fbf8f2;
  stroke-width: 0.9;
  cursor: pointer;
}

.map-svg path.status-passed { fill: var(--passed); }
.map-svg path.status-passed.is-caveat { fill: url(#passed-hatch); }
.map-svg path.status-progress { fill: url(#progress-hatch); }
.map-svg path.status-progress.is-stalled { fill: url(#stalled-hatch); }
.map-svg path.status-none { fill: #ddd6c8; }

.federal-spot {
  cursor: pointer;
}

.federal-spot rect {
  fill: #1c3a5f;
  stroke: #fbf8f2;
  stroke-width: 1.4;
}

.federal-spot text {
  fill: #fbf8f2;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 700;
  pointer-events: none;
}

.federal-spot .federal-sub {
  font-size: 11px;
  letter-spacing: 0.12em;
}

.federal-spot:hover rect,
.federal-spot:focus rect,
.federal-spot:focus-visible rect {
  fill: #142940;
}

.federal-spot:focus-visible {
  outline: none;
}

.federal-cta {
  margin-top: 1.6rem;
  padding: 0.95rem 1rem 1rem;
  background: #f6efe2;
  border: 3px dotted #c23b2e;
}

.federal-cta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.federal-cta h2::before { content: none; }

.federal-cta ol {
  margin: 0.35rem 0 0;
  padding-left: 1.35rem;
}

.federal-cta li { margin: 0.4rem 0; }

.federal-cta .guide-back { font-weight: inherit; }

.federal-cta-or {
  margin: 0.9rem 0 0;
  font-weight: 700;
}

.federal-sources {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.federal-sources li { margin: 0.25rem 0; }

.map-svg path.is-selected,
.map-svg path.county.is-current {
  stroke: var(--ink);
  stroke-width: 2.4;
}

.map-svg.is-filtering path { opacity: 0.28; }
.map-svg.is-filtering path.is-match { opacity: 1; }

.side {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.officials {
  order: -1;
  grid-column: 1 / -1;
}

.lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
}

.detail { padding: 1rem 1.05rem 1.1rem; }

.detail h3 {
  margin: 0 0 0.2rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.55rem;
  font-weight: 560;
  line-height: 1.15;
}

.status-line {
  margin: 0 0 0.55rem;
  font-weight: 700;
}

.status-line.passed { color: var(--passed); }
.status-line.passed.caveat::before {
  content: "";
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.4rem;
  vertical-align: -0.12rem;
  background: repeating-linear-gradient(-45deg, #1d6b43, #1d6b43 3px, #d7efe3 3px, #d7efe3 6px);
  border: 1px solid #1d6b43;
}
.status-line.progress { color: var(--progress); }
.status-line.progress.stalled { color: #9a2a22; }
.status-line.progress.stalled::before {
  content: "";
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.4rem;
  vertical-align: -0.12rem;
  background: repeating-linear-gradient(-45deg, #c23b2e, #c23b2e 3px, #f8d4ce 3px, #f8d4ce 6px);
  border: 1px solid #c23b2e;
}
.status-line.none { color: var(--none); }

.detail p { margin: 0.35rem 0; }
.detail .meta { color: var(--muted); font-size: 0.95rem; }

.links { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 0.75rem; }
.links a { font-weight: 700; }

.official-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 2rem;
}
.officials h4 {
  margin: 0.7rem 0 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.officials ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.officials li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.55rem;
  align-items: baseline;
  padding: 0.18rem 0;
  border-bottom: 1px solid var(--line);
}
.officials li:last-child { border-bottom: 0; }
.official-meta { color: var(--muted); font-size: 0.92rem; }
.profile-link { font-weight: 700; text-decoration: underline; }
.cta-person a { font-weight: 700; text-decoration: underline; }
.officials .source-note { margin-top: 0.8rem; }

.groupchat-banner {
  display: block;
  margin: 0.9rem 0 1rem;
  padding: 0.9rem 1.15rem;
  background: #e10600;
  border: 2px solid #9a0500;
  color: #fff;
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.groupchat-banner:hover,
.groupchat-banner:focus-visible {
  background: #c10500;
  color: #fff;
  text-decoration: underline;
}

.officials .cta {
  margin-top: 0.85rem;
  padding: 0.95rem 1rem 0.85rem;
  background: #f6efe2;
  border: 3px dotted #c23b2e;
}
.officials .cta h4 {
  margin: 0 0 0.35rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.28rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: none;
}
.officials .cta p { margin: 0.15rem 0 0.65rem; }
.officials .cta-bills {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  list-style: disc;
}
.officials .cta-bills li {
  display: list-item;
  padding: 0.08rem 0;
  border-bottom: 0;
}

.officials .cta-sponsor-steps {
  margin: 0.15rem 0 0.85rem;
  padding-left: 1.35rem;
}

.officials .cta-sponsor-steps li {
  display: list-item;
  padding: 0.18rem 0;
  border-bottom: 0;
}

.officials .cta-sponsor-steps a {
  font-weight: 700;
}
.officials .cta-people li {
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding: 0.45rem 0;
}
.cta-person {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.55rem;
  min-width: 0;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-weight: 700;
}

.cta-email {
  font-weight: 600;
  user-select: all;
}

.list-block { padding: 0.75rem 0.85rem 0.9rem; }
.list-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chips.scroll {
  max-height: none;
  overflow: visible;
}

.chip {
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.18rem 0.55rem;
  cursor: pointer;
}

.chip.is-caveat,
.pill.is-caveat {
  background: repeating-linear-gradient(-45deg, #fbf8f2, #fbf8f2 3px, #d7efe3 3px, #d7efe3 6px);
}

.chip.is-stalled,
.pill.is-stalled {
  background: repeating-linear-gradient(-45deg, #fbf8f2, #fbf8f2 3px, #f8d4ce 3px, #f8d4ce 6px);
}

.chip.is-current {
  border-color: var(--ink);
  background: var(--ink);
  color: #fbf8f2;
}

.empty { margin: 0; color: var(--muted); font-size: 0.95rem; }

.site-footer {
  padding: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p { margin: 0.2rem 0; }

#visitor-count-value { font-variant-numeric: tabular-nums; }

.profile-back { margin: 0.75rem 0 0; font-weight: 700; }
.profile-page {
  width: min(44rem, calc(100% - 2rem));
  margin: 0.5rem auto 3rem;
}
.profile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.2rem 1.25rem 1.3rem;
}
.profile-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.profile-photo {
  width: 7.25rem;
  height: 9rem;
  object-fit: cover;
  object-position: center top;
  background: var(--paper);
  flex: none;
}
.profile-page h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}
.profile-role {
  margin: 0.35rem 0 0;
  color: var(--muted);
}
.profile-facts {
  margin: 1rem 0 0;
}
.profile-fact {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.42rem 0;
  border-top: 1px solid var(--line);
}
.profile-fact dt { margin: 0; color: var(--muted); }
.profile-fact dd { margin: 0; overflow-wrap: anywhere; }
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.95rem;
  font-weight: 700;
}
.profile-stance {
  margin-top: 1.15rem;
  padding-top: 0.15rem;
}
.profile-stance h2 {
  margin: 0 0 0.35rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 560;
}
.profile-stance p { margin: 0.35rem 0; }

.bill-actions {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.bill-actions li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.38rem 0;
  border-top: 1px solid var(--line);
}

.bill-actions time {
  color: var(--muted);
}

.tie-bars {
  margin-top: 1.25rem;
  padding: 0.95rem 1rem 0.35rem;
  background: #f6efe2;
  border: 3px solid #9a5b10;
}

.tie-bars h2 { margin-top: 0; }

.tie-bar {
  padding: 0.75rem 0;
  border-top: 1px solid #e0c9a4;
}

.tie-bar h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 560;
}

.tie-bar p { margin: 0.3rem 0; }

.tie-bar a { font-weight: 700; }
.profile-message { margin-top: 1rem; }

@media (max-width: 560px) {
  .profile-head { flex-direction: column; }
  .profile-fact,
  .bill-actions li { grid-template-columns: 1fr; gap: 0.1rem; }
}

@media (max-width: 1100px) {
  .side,
  .lists,
  .official-groups { grid-template-columns: 1fr; }
  .detail { order: 2; }
  .detail.officials { order: 1; }
  .lists { order: 3; }
}

@media (max-width: 860px) {
  .totals-grid,
  .toolbar { grid-template-columns: 1fr; }
  select { font-size: 0.84rem; }
  .legend { justify-content: flex-start; }
  .hover-readout { text-align: left; }
  .map-head { flex-direction: column; gap: 0.15rem; }
}

.research { padding-bottom: 1.5rem; }

.research-wrap { max-width: 68rem; }

.stat-hero {
  display: grid;
  grid-template-columns: minmax(0, 40rem) auto;
  gap: 0.5rem 2rem;
  align-items: center;
  margin-top: 0.85rem;
}

.stat-hero h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-size: clamp(2rem, 4vw, 2.85rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-art {
  width: 15rem;
  height: auto;
  justify-self: end;
}

.glance {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.35rem 0 0;
  padding: 0;
}

.glance li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--passed);
  padding: 0.85rem 0.9rem 1rem;
}

.glance-num {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--passed);
}

.glance-num small {
  display: block;
  margin-top: 0.15rem;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.glance p:last-child {
  margin: 0.45rem 0 0;
  font-size: 0.98rem;
}

.stat-card {
  margin-top: 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.15rem 1.25rem 1.25rem;
}

.stat-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--progress);
}

.stat-card h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stat-card > p,
.stat-copy p { margin: 0.55rem 0 0; }

.waffle-layout {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: 0.5rem 1.75rem;
  align-items: center;
  margin-top: 1rem;
}

.waffle { width: 100%; height: auto; display: block; }

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

.waffle-legend li {
  display: grid;
  grid-template-columns: 0.9rem auto;
  gap: 0.5rem;
  align-items: start;
}

.swatch-sq {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.2rem;
  border-radius: 2px;
}

.swatch-all { background: #1d6b43; }
.swatch-some { background: #3f8f62; }
.swatch-equal { background: #d4c4ae; box-shadow: inset 0 0 0 1px #7d6e58; }
.swatch-one {
  background: repeating-linear-gradient(-45deg, #f8d4ce, #f8d4ce 2px, #c23b2e 2px, #c23b2e 4.2px);
}

.waffle-legend strong { font-variant-numeric: tabular-nums; }

.stat-callout {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  background: #f3f7f4;
  border-left: 4px solid var(--passed);
}

.stat-callout p { margin: 0; }

.controls {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
}

.controls li {
  background: #fff;
  border: 1px solid #c5ddd0;
  padding: 0.3rem 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.outcomes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
}

.outcomes li {
  background: #f3f7f4;
  padding: 0.75rem 0.6rem 0.8rem;
  text-align: center;
  font-weight: 700;
}

.icon {
  width: 2.45rem;
  height: 2.45rem;
  margin: 0 auto 0.4rem;
  border-radius: 50%;
  background: #d7efe3;
  color: var(--passed);
  display: grid;
  place-items: center;
}

.icon svg { width: 1.35rem; height: 1.35rem; }

.dot-chart { margin-top: 1.05rem; }

.split-dots { width: min(100%, 28rem); height: auto; display: block; }

.dot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.dot-legend li { display: flex; align-items: center; gap: 0.4rem; }

.dot-key {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #1d6b43;
}

.dot-key.open {
  background: #e7f3ec;
  box-shadow: inset 0 0 0 1.5px #1d6b43;
}

.stat-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.15rem;
  align-items: stretch;
}

.stat-pair .stat-card { margin-top: 0; }

.ruler { margin-top: 1.15rem; }

.ruler-value {
  margin: 0 0 0.35rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  color: var(--passed);
}

.ruler-track {
  position: relative;
  height: 0.55rem;
  border-radius: 999px;
  background: #e6dfd2;
}

.ruler-fill {
  display: block;
  width: 21.8%;
  height: 100%;
  border-radius: inherit;
  background: var(--passed);
}

.ruler-pin {
  position: absolute;
  left: 21.8%;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.ruler-ticks {
  position: relative;
  height: 2.1rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.ruler-ticks span { position: absolute; top: 0; }
.ruler-ticks span:nth-child(1) { left: 0; }
.ruler-ticks span:nth-child(2) { left: 40%; transform: translateX(-50%); text-align: center; }
.ruler-ticks span:nth-child(3) { right: 0; text-align: right; }

.stat-card .cite { margin-top: 0.95rem; }

.ruler-ticks small {
  display: block;
  font-size: 0.78rem;
}

.time-note {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.95rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.time-note p { margin: 0; }

.time-note svg { width: 2.6rem; height: 2.6rem; flex: none; color: var(--passed); }

.ring-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-top: 0.9rem;
}

.ring {
  width: 6.6rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--passed) 75%, #e6dfd2 0);
  display: grid;
  place-items: center;
}

.ring span {
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  color: var(--passed);
}

.rank {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.rank li {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.stamp {
  display: grid;
  place-items: center;
  min-height: 2rem;
  padding: 0.15rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
}

.stamp.best { background: #1d6b43; color: #fbf8f2; }
.stamp.close { background: #d7efe3; color: #1d6b43; }
.stamp.low { background: #f8d4ce; color: #8a2e24; }

.rank h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.rank p { margin: 0.1rem 0 0; }

.infant-layout {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 1.35rem;
  align-items: center;
  margin-top: 1rem;
}

.seal {
  width: 11.5rem;
  height: 11.5rem;
  border-radius: 50%;
  border: 2px solid var(--passed);
  outline: 1px solid var(--passed);
  outline-offset: -7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.55rem;
}

.seal-num {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 3rem;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--passed);
}

.seal-label {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.findings {
  list-style: none;
  margin: 0;
  padding: 0;
}

.findings li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.findings li:last-child { border-bottom: 1px solid var(--line); }

.findings p { margin: 0; }

.polls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
  margin-top: 0.9rem;
}

.poll-num {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--passed);
  white-space: nowrap;
}

.poll-track {
  position: relative;
  height: 0.7rem;
  margin: 0.7rem 0 0.35rem;
  border-radius: 999px;
  background: #e6dfd2;
}

.poll-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--passed);
}

.poll-tick {
  position: absolute;
  left: 87%;
  top: -0.28rem;
  bottom: -0.28rem;
  width: 2px;
  background: var(--ink);
}

.poll-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.held {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.held li {
  background: #f3f7f4;
  border: 1px solid #c5ddd0;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
}

.held li::before {
  content: "✓ ";
  color: var(--passed);
}

.cite {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-limits {
  margin-top: 1.35rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: #f6efe2;
  border: 1px solid #e0c9a4;
}

.stat-limits h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.stat-limits p { margin: 0.55rem 0 0; }

.presumption {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e0c9a4;
}

.presumption h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-size: 1.25rem;
}

.research-back { margin: 1.25rem 0 0; }

@media (max-width: 900px) {
  .stat-hero,
  .waffle-layout,
  .stat-pair,
  .infant-layout,
  .polls,
  .outcomes { grid-template-columns: 1fr; }
  .glance { grid-template-columns: 1fr 1fr; }
  .hero-art { justify-self: start; width: 12rem; }
  .seal { margin-inline: auto; }
}

@media (max-width: 520px) {
  .glance { grid-template-columns: 1fr; }
  .poll-num { white-space: normal; }
}
