/* County district-rating pages. Scoped under .cr-page so site chrome is untouched.
   Layout follows the district-reviews mockup: heading, summary + reviews, advocate column. */

.cr-page {
  background: #fff;
  color: #111;
  font-size: 16px;
  line-height: 1.55;
}

.cr-page * {
  box-sizing: border-box;
}

.cr-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 36px;
}

.cr-crumbs {
  padding: 28px 0 15px;
  color: #626262;
  font-size: 13px;
}

.cr-crumbs a {
  color: #111;
  font-weight: 650;
  text-decoration: none;
}

.cr-crumbs a:hover,
.cr-crumbs a:focus-visible {
  text-decoration: underline;
  text-decoration-color: #f2b8ab;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
  text-decoration-skip-ink: none;
}

.cr-meta a,
.cr-resource a,
.cr-districts a,
.cr-districtlist a {
  color: #111;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #f2b8ab;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
  text-decoration-skip-ink: none;
}

.cr-meta a:hover,
.cr-resource a:hover,
.cr-districts a:hover,
.cr-districtlist a:hover {
  text-decoration-color: #e9a99a;
}

.cr-crumbs span {
  margin: 0 10px;
  color: #aaa;
}

.cr-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 22px;
  margin-bottom: 30px;
}

.cr-heading > div {
  min-width: 0;
  flex: 1;
}

.cr-heading .cr-btn {
  flex-shrink: 0;
}

.cr-eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3f1ec;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.cr-heading h1 {
  font-family: var(--fpa-app-font-sans, Inter, Arial, sans-serif);
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.9px;
  font-weight: 750;
  margin: 0;
}

.cr-meta {
  font-size: 14px;
  color: #666;
  margin: 8px 0 0;
}

.cr-meta span {
  margin: 0 8px;
  color: #aaa;
}

.cr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #171717;
  color: #fafafa;
  box-shadow: 0 0 0 1px #171717;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.cr-resource a.cr-btn,
.cr-resource a.cr-btn:hover {
  color: #fafafa;
  font-weight: 500;
  text-decoration: none;
}

.cr-btn:hover {
  background: #262626;
  color: #fafafa;
}

.cr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 38px;
  margin: 0 0 70px;
  min-width: 0;
}

.cr-primary,
.cr-summary,
.cr-aside,
.cr-ad,
.cr-review {
  min-width: 0;
}

.cr-summary {
  background: #f6f6f6;
  padding: 30px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: center;
}

.cr-summary__overall {
  text-align: center;
}

.cr-summary__label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cr-summary__score,
.cr-summary__value,
.cr-tile,
.cr-score {
  background: #83edc0;
  color: #171717;
  font-weight: 800;
}

.cr-summary__score--1,
.cr-summary__value--1,
.cr-tile--1,
.cr-score--1,
.cr-summary__score--low,
.cr-summary__value--low,
.cr-tile--low {
  background: #ffb5a4;
}

.cr-summary__score--2,
.cr-summary__value--2,
.cr-tile--2,
.cr-score--2 {
  background: #ffc98a;
}

.cr-summary__score--3,
.cr-summary__value--3,
.cr-tile--3,
.cr-score--3,
.cr-summary__score--mid,
.cr-summary__value--mid,
.cr-tile--mid {
  background: #ffe66e;
}

.cr-summary__score--4,
.cr-summary__value--4,
.cr-tile--4,
.cr-score--4 {
  background: #b7e7a0;
}

.cr-summary__score--5,
.cr-summary__value--5,
.cr-tile--5,
.cr-score--5 {
  background: #83edc0;
}

.cr-summary__score--empty,
.cr-summary__value--empty,
.cr-score--empty {
  background: #f0eeea;
  color: #777;
}

.cr-summary__score {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  line-height: 1.2;
  letter-spacing: -2px;
  padding: 10px 0;
  min-height: 92px;
}

.cr-summary__of,
.cr-summary__count {
  font-size: 12px;
  color: #666;
}

.cr-summary__of {
  margin-top: 6px;
}

.cr-summary__count {
  margin: 12px 0 0;
}

.cr-summary__cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 25px;
}

.cr-summary__cat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.35;
  min-width: 0;
}

.cr-summary__cat > span {
  min-width: 0;
}

.cr-summary__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  letter-spacing: -0.5px;
  min-width: 57px;
  min-height: 40px;
  text-align: center;
  line-height: 1.4;
  padding: 3px 7px;
}

.cr-score {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: -0.3px;
  line-height: 1;
}

.cr-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgb(23 23 23 / 0.16);
  border-top-color: #171717;
  border-radius: 50%;
  animation: cr-spin 0.7s linear infinite;
}

.cr-spin--lg {
  width: 22px;
  height: 22px;
  border-width: 2.5px;
}

.cr-spin--sm {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
  vertical-align: -1px;
}

@keyframes cr-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cr-spin { animation: none; }
}

.cr-note,
.cr-legend {
  font-size: 12px;
  color: #777;
}

.cr-note {
  margin: 13px 0 22px;
}

.cr-tabs {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin: 28px 0 24px;
  padding: 3px;
  border-radius: 10px;
  background: #f4f4f5;
  min-width: 0;
  overflow-x: auto;
}

.cr-tab-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px #0000000f, 0 1px 1px -0.5px #0000000f;
  pointer-events: none;
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1), width 180ms cubic-bezier(0.2, 0, 0, 1);
}

.cr-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #737373;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.cr-tab:hover:not(.is-active) {
  background: rgb(0 0 0 / 0.04);
}

.cr-tab.is-active {
  color: #171717;
  background: #fff;
  box-shadow: 0 0 0 1px #0000000f, 0 1px 1px -0.5px #0000000f;
}

.cr-tabs:has(.cr-tab-indicator) .cr-tab.is-active {
  background: transparent;
  box-shadow: none;
}

.cr-tab em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  font-style: normal;
  background: #eae8e3;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 12px;
  margin-left: 6px;
}

.cr-listhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}

.cr-listhead h2,
.cr-panel h2,
.cr-adheading {
  font-size: 22px;
  letter-spacing: -0.7px;
  font-weight: 750;
  line-height: 1.2;
  color: #111;
  margin: 0;
}

.cr-menu {
  position: relative;
}

.cr-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px #e5e5e5;
  color: #171717;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.cr-menu__trigger:hover {
  background: #fafafa;
}

.cr-menu__trigger[aria-expanded="true"] {
  box-shadow: 0 0 0 1px #171717;
}

.cr-menu__chevron {
  color: #737373;
}

.cr-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  min-width: 180px;
  padding: 4px;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 0 0 1px #0000000f,
    0 1px 1px -0.5px #0000000f,
    0 3px 3px -1.5px #0000000f,
    0 6px 6px -3px #0000000f;
}

.cr-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #171717;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.cr-menu__check {
  flex: none;
  margin-right: 8px;
  visibility: hidden;
}

.cr-menu__item.is-checked .cr-menu__check {
  visibility: visible;
}

.cr-menu__item:hover,
.cr-menu__item:focus-visible {
  background: #f4f4f5;
  outline: none;
}

.cr-menu__item.is-checked {
  background: #f4f4f5;
}

.cr-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.cr-chip {
  border: 1px solid #dedcd7;
  border-radius: 6px;
  padding: 8px 15px;
  background: transparent;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.cr-chip.is-active {
  color: #fff;
  background: #111;
  border-color: #111;
}

.cr-legend {
  margin: -9px 0 20px;
}

.cr-review {
  background: #f6f6f6;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 25px;
  padding: 28px;
  margin-bottom: 20px;
}

.cr-rating {
  text-align: center;
}

.cr-rating__label {
  font-size: 12px;
  font-weight: 650;
  color: #111;
  margin-bottom: 9px;
}

.cr-tile {
  font-size: 36px;
  line-height: 1.3;
  padding: 15px 0;
}

.cr-rating__of {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

.cr-reviewmeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 13px;
}

.cr-reviewmeta strong {
  font-size: 14px;
}

.cr-reviewmeta time {
  font-size: 12px;
  font-weight: 650;
  color: #333;
}

.cr-review h3 {
  font-size: 20px;
  letter-spacing: -0.3px;
  margin: 0 0 9px;
}

.cr-review p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  max-width: 650px;
}

.cr-review__sub {
  font-size: 13px;
  color: #626262;
  margin-top: 2px;
}

.cr-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  row-gap: 15px;
  margin: 24px 0 25px;
}

.cr-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 18px;
  gap: 9px;
  align-items: center;
}

.cr-metric__name {
  font-weight: 650;
  font-size: 12px;
  line-height: 1.35;
}

.cr-meter {
  display: flex;
  gap: 2px;
  border-radius: 100px;
  overflow: hidden;
  height: 12px;
}

.cr-seg {
  flex: 1;
  background: #e3e3e3;
}

.cr-seg.is-on {
  background: #83edc0;
}

.cr-meter--mid .cr-seg.is-on {
  background: #ffe66e;
}

.cr-meter--low .cr-seg.is-on {
  background: #ffb5a4;
}

.cr-metric__value,
.cr-na {
  font-size: 12px;
  color: #555;
  text-align: right;
}

.cr-na {
  grid-column: 2 / -1;
  text-align: left;
  color: #777;
}

.cr-reviewfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 4px;
  gap: 12px;
}

.cr-voting {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cr-votelabel {
  font-size: 13px;
  font-weight: 650;
  margin-right: 3px;
}

.cr-votebtn,
.cr-linkbtn {
  border: 0;
  background: none;
  cursor: pointer;
}

.cr-votebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  min-width: 52px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #111;
  padding: 7px;
  font-size: 13px;
}

.cr-votebtn:hover {
  background: #e9e9e9;
}

.cr-votebtn.is-chosen {
  background: #f3f1ec;
  border-color: #111;
  color: #111;
}

.cr-thumb--down {
  transform: rotate(180deg);
}

.cr-linkbtn {
  font-weight: 600;
  font-size: 12px;
  color: #444;
  padding: 4px 0;
}

.cr-linkbtn:hover {
  color: #111;
  text-decoration: underline;
}

.cr-empty,
.cr-resource {
  background: #fff;
  border: 1px solid #e8e6e1;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 16px;
}

.cr-resource h3,
.cr-panel h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.4px;
}

.cr-resource p,
.cr-districts li {
  font-size: 15px;
  color: #444;
}

.cr-resource a,
.cr-districts a {
  font-size: 14px;
}

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

.cr-districts li {
  padding: 12px 0;
  border-bottom: 1px solid #e8e6e1;
}

.cr-districts li:last-child {
  border-bottom: 0;
}

.cr-districts strong {
  color: #111;
}

.cr-aside {
  padding-top: 0;
}

.cr-adheading {
  margin: 0 0 16px;
}

.cr-aside-lead {
  margin: -8px 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}

.cr-ad {
  border: 1px solid #e8e6e1;
  margin-bottom: 24px;
  background: #fff;
}

.cr-ad a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cr-adlabel {
  font-size: 10px;
  color: #777;
  text-align: center;
  padding: 7px;
  letter-spacing: 0.3px;
  background: #fafafa;
  margin: 0;
}

.cr-adphoto,
.cr-adinitials {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center 20%;
  background: #f3f1ec;
}

.cr-adinitials {
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 750;
  color: #555;
}

.cr-adcopy {
  padding: 19px 20px 22px;
}

.cr-adcopy h3 {
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin: 0 0 7px;
}

.cr-adcopy p {
  font-size: 13px;
  color: #555;
  margin: 0 0 8px;
}

.cr-adcopy .cr-adlocation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #737373;
}

.cr-adsep {
  display: inline-block;
  width: 1px;
  height: 12px;
  margin: 0 8px;
  background: #d4d4d4;
}

.cr-adcopy .cr-btn {
  display: flex;
  width: 100%;
  margin-top: 16px;
  font-size: 14px;
}

.cr-adall {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px #e5e5e5;
  color: #171717;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.cr-adall:hover {
  background: #f4f4f5;
  color: #171717;
}

.cr-adall:focus-visible {
  outline: 2px solid #6b97ff;
  outline-offset: 2px;
}

.cr-aside-note {
  font-size: 11px;
  color: #777;
  line-height: 1.7;
  margin: 18px 0 0;
}

.cr-signin-note {
  font-size: 13px;
  color: #555;
  margin: 0 0 16px;
}

.cr-find {
  margin: 8px 0 28px;
}

.cr-find__label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin: 0 0 8px;
}

.cr-find__field {
  position: relative;
}

.cr-find__input {
  display: block;
  width: 100%;
  border: 1px solid #dedcd7;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 12px 56px 12px 18px;
  font: inherit;
  font-size: 16px;
}

.cr-find__input::-webkit-search-decoration,
.cr-find__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.cr-find__go {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.cr-find__go:hover {
  background: #f3f1ec;
}

.cr-find__empty {
  margin: 12px 0 0;
  color: #555;
  font-size: 14px;
}

.cr-empty p {
  margin: 0 0 16px;
}

.cr-empty .cr-btn {
  margin-top: 0;
}

.cr-districtlist {
  list-style: none;
  padding: 0;
  margin: 0 0 70px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cr-districtlist li {
  min-width: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px #e5e5e5;
}

.cr-districtlist li:hover {
  background: #f4f4f5;
}

.cr-districtlist a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 12px;
  color: #171717;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
}

.cr-districtlist a:hover {
  color: #171717;
  text-decoration: none;
}

.cr-districtlist a:focus-visible {
  outline: 2px solid #6b97ff;
  outline-offset: 2px;
}

.cr-districtlist__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cr-districtlist__meta {
  color: #737373;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.cr-toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 15px 25px;
  border-radius: 12px;
  z-index: 5;
  font-size: 14px;
  width: max-content;
  max-width: 90%;
}

.cr-page :focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .cr-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 26px;
  }

  .cr-summary {
    grid-template-columns: 105px 1fr;
    padding: 24px;
    gap: 20px;
  }

  .cr-summary__cat {
    font-size: 12px;
  }

  .cr-summary__value {
    min-width: 44px;
    font-size: 23px;
  }

  .cr-metric {
    grid-template-columns: minmax(0, 1fr) 70px 16px;
    gap: 5px;
  }

  .cr-adphoto,
  .cr-adinitials {
    height: 280px;
  }

  .cr-review {
    padding: 24px;
    grid-template-columns: 65px minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .cr-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
  }

  .cr-summary {
    grid-template-columns: 85px 1fr;
    padding: 20px;
  }

  .cr-summary__cats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cr-summary__score {
    font-size: 47px;
  }

  .cr-metrics {
    grid-template-columns: 1fr;
  }

  .cr-metric {
    grid-template-columns: minmax(0, 1fr) 105px 18px;
    gap: 10px;
  }

  .cr-adphoto,
  .cr-adinitials {
    height: 260px;
  }

  .cr-adcopy h3 {
    font-size: 20px;
  }
}

@media (max-width: 680px) {
  .cr-shell {
    padding: 0 20px;
  }

  .cr-crumbs {
    padding: 23px 0;
    font-size: 12px;
  }

  .cr-heading {
    display: block;
    margin-bottom: 22px;
  }

  .cr-heading .cr-btn {
    margin-top: 20px;
  }

  .cr-heading h1 {
    font-size: 25px;
  }

  .cr-meta {
    font-size: 12px;
  }

  .cr-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cr-summary {
    padding: 22px 18px;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 23px;
  }

  .cr-summary__score {
    font-size: 43px;
  }

  .cr-summary__value {
    font-size: 21px;
    min-width: 45px;
  }

  .cr-review {
    padding: 20px 16px;
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 14px;
  }

  .cr-tile {
    font-size: 27px;
    padding: 13px 0;
  }

  .cr-review h3 {
    font-size: 17px;
  }

  .cr-review p {
    font-size: 14px;
  }

  .cr-reviewmeta {
    flex-wrap: wrap;
    gap: 5px;
  }

  .cr-tab {
    font-size: 13px;
  }

  .cr-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .cr-adheading,
  .cr-aside-lead,
  .cr-adall,
  .cr-aside-note {
    grid-column: 1 / -1;
  }

  .cr-ad {
    margin: 0;
  }

  .cr-adphoto,
  .cr-adinitials {
    height: 220px;
  }

  .cr-adcopy {
    padding: 12px;
  }

  .cr-adcopy h3 {
    font-size: 17px;
  }

  .cr-districtlist {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .cr-aside {
    grid-template-columns: 1fr;
  }

  .cr-adphoto,
  .cr-adinitials {
    height: 300px;
  }

  .cr-tab {
    font-size: 13px;
  }
}
