:root {
  --court-blue: #0d518d;
  --court-navy: #0b355a;
  --court-navy-2: #0d416e;
  --court-gold: #ffd04a;
  --court-paper: #f3f7fa;
  --court-ink: #132638;
  --court-muted: #6e7d8a;
  --court-line: #d7e2ea;
  --court-green: #157a58;
}

.court-jurisdiction-page {
  overflow: hidden;
  background: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
}

.jurisdiction-hero {
  position: relative;
  min-height: 540px;
  margin-top: 0;
  overflow: hidden;
  background: var(--court-navy);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.22),
    0 30px 60px rgba(0, 0, 0, 0.12);
  color: #fff;
}

.jurisdiction-hero__image,
.jurisdiction-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.jurisdiction-hero__image {
  object-fit: cover;
  object-position: center;
}

.jurisdiction-hero__shade {
  background:
    linear-gradient(90deg, rgba(3, 20, 36, 0.08) 0%, rgba(3, 20, 36, 0.16) 44%, rgba(3, 20, 36, 0.82) 100%),
    linear-gradient(0deg, rgba(3, 20, 36, 0.28), transparent 45%);
}

.jurisdiction-hero__content {
  position: absolute;
  top: auto;
  right: max(6vw, calc((100vw - 1120px) / 2));
  bottom: 44px;
  width: min(560px, 46vw);
  padding: 38px 40px;
  transform: none;
  border-left: 3px solid var(--court-gold);
  background: rgba(4, 25, 45, 0.68);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
}

.jurisdiction-hero__eyebrow {
  margin: 0 0 12px;
  color: var(--court-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.jurisdiction-hero h1 {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.3;
  text-transform: uppercase;
}

.jurisdiction-hero__content > p:last-child {
  max-width: 500px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.55;
  text-transform: uppercase;
}

.jurisdiction-controls {
  margin-top: 150px;
  padding: 70px 0 34px;
  background: #fff;
}

.jurisdiction-controls .container,
.jurisdiction-explorer {
  max-width: 970px;
}

.jurisdiction-data-as-of {
  margin: 0 0 12px;
  color: var(--court-muted);
  font-size: 12px;
  line-height: 1.5;
}

.jurisdiction-data-as-of time {
  color: var(--court-ink);
  font-weight: 600;
}

.latest-update {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #e8dda8;
  border-radius: 14px;
  background: #fffbec;
}

.latest-update__stamp {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 155px;
  padding: 8px 15px;
  border-right: 1px solid #e8dda8;
}

.latest-update__label {
  margin-bottom: 5px;
  color: #826713;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.latest-update time {
  color: var(--court-ink);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.latest-update__items {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.latest-update__court {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  max-width: 420px;
  padding: 9px 13px;
  border: 1px solid #dfd5a3;
  border-radius: 10px;
  background: #fff;
  color: var(--court-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.latest-update__court:hover {
  border-color: var(--court-gold);
  transform: translateY(-1px);
}

.latest-update__court span {
  margin-bottom: 4px;
  color: var(--court-blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.latest-update__court strong {
  font-size: 12px;
  line-height: 1.35;
}

.jurisdiction-search-row {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: 32px;
}

.jurisdiction-search {
  display: grid;
  gap: 8px;
  width: 250px;
  max-width: 250px;
  color: var(--court-ink);
  font-size: 12px;
  font-weight: 700;
}

.jurisdiction-search__field {
  position: relative;
  display: block;
}

.jurisdiction-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--court-blue);
  pointer-events: none;
}

.jurisdiction-search input {
  width: 250px;
  max-width: 250px;
  min-height: 46px;
  padding: 10px 13px 10px 40px;
  border: 1px solid #bdcdda;
  border-radius: 8px;
  background: #fff;
  color: var(--court-ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jurisdiction-search input:focus {
  border-color: var(--court-blue);
  box-shadow: 0 0 0 3px rgba(13, 81, 141, 0.12);
}

.jurisdiction-search-note {
  margin: 0 0 12px;
  color: var(--court-muted);
  font-size: 12px;
}

.region-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.region-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 8px 7px 13px;
  border: 1px solid #cbd8e2;
  border-radius: 999px;
  background: #fff;
  color: #536473;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: 0.2s ease;
}

.region-filter span {
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: #eaf2f8;
  color: var(--court-blue);
  font-size: 10px;
}

.region-filter:hover,
.region-filter.is-active {
  border-color: var(--court-blue);
  background: var(--court-blue);
  color: #fff;
}

.region-filter.is-active span {
  background: var(--court-gold);
  color: var(--court-navy);
}

.jurisdiction-explorer-wrap {
  padding: 18px 0 270px;
  background: #fff;
}

.jurisdiction-explorer {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  min-height: 660px;
  padding: 28px;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    var(--court-navy-2);
  background-size: 38px 38px;
  box-shadow: 0 22px 60px rgba(6, 31, 55, 0.18);
  color: #fff;
}

.court-index {
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.court-index__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
}

.court-index__summary strong {
  color: var(--court-gold);
  white-space: nowrap;
}

.court-index__list {
  max-height: 590px;
  overflow-y: auto;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.court-index__item {
  display: block;
  width: 100%;
  padding: 16px 17px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid transparent;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: 0.18s ease;
}

.court-index__item:last-child {
  border-bottom: 0;
}

.court-index__item:hover,
.court-index__item.is-active {
  border-left-color: var(--court-gold);
  background: rgba(255, 255, 255, 0.1);
}

.court-index__item strong,
.court-index__item span {
  display: block;
}

.court-index__item strong {
  font-size: 14px;
  line-height: 1.42;
}

.court-index__item span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.court-index__empty {
  padding: 36px 20px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.court-index__pager {
  display: none;
}

.court-index__pager[hidden] {
  display: none;
}

.court-route {
  min-width: 0;
  padding: 4px 0;
}

.court-route__empty {
  display: grid;
  min-height: 590px;
  place-content: center;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.court-route__empty h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.court-route__empty p {
  margin: 0;
}

.court-route__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 38px;
}

.court-route__header h2 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.3;
  text-transform: uppercase;
}

.route-scroll {
  min-width: 0;
  overflow-x: auto;
  padding: 8px 2px 16px;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  scrollbar-width: thin;
}

.route-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--route-count), minmax(172px, 1fr));
  gap: 18px;
  min-width: calc(var(--route-count) * 172px + (var(--route-count) - 1) * 18px);
}

.route-timeline::before {
  position: absolute;
  z-index: 0;
  top: 28px;
  right: 5%;
  left: 5%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), var(--court-gold));
  content: "";
}

.route-step {
  position: relative;
  z-index: 1;
}

.route-step__number {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--court-navy);
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 14px;
}

.route-step.is-current .route-step__number {
  border-color: var(--court-gold);
  background: var(--court-gold);
  color: var(--court-navy);
  box-shadow: 0 0 0 8px rgba(255, 208, 74, 0.13);
}

.route-step__card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.075);
}

.route-step.is-current .route-step__card {
  border-color: rgba(255, 208, 74, 0.62);
  background: linear-gradient(145deg, rgba(255, 208, 74, 0.13), rgba(255, 255, 255, 0.07));
}

.route-step__label {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.route-step__card h3 {
  margin: 20px 0 22px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.route-step__website {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin: -10px 0 18px;
  color: #c9e5f7;
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 229, 247, 0.35);
  text-underline-offset: 3px;
}

.route-step__website:hover {
  color: #fff;
  text-decoration-color: var(--court-gold);
}

.route-step__website span {
  color: var(--court-gold);
}

.route-step__decision {
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  line-height: 1.55;
}

.route-step__decision strong {
  display: block;
  margin-bottom: 4px;
  color: var(--court-gold);
  font-size: 12px;
}

.route-step__decision-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: #c9e5f7;
  text-decoration: underline;
  text-decoration-color: rgba(201, 229, 247, 0.35);
  text-underline-offset: 3px;
}

.route-step__decision-link:hover {
  color: #fff;
  text-decoration-color: var(--court-gold);
}

.route-step__decision-link span {
  flex: 0 0 auto;
  color: var(--court-gold);
}

.court-route__result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 19px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.13);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  line-height: 1.5;
}

.court-route__result strong {
  color: #fff;
}

.court-route__result span:last-child {
  flex: 0 0 auto;
  color: var(--court-gold);
  font-weight: 700;
}

@media (max-width: 980px) {
  .jurisdiction-hero__content {
    right: 28px;
    width: min(590px, calc(100vw - 56px));
  }

  .jurisdiction-explorer {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .court-index__list {
    display: flex;
    max-height: none;
    overflow-x: auto;
  }

  .court-index__item {
    flex: 0 0 245px;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: 0;
    border-left: 0;
    border-top: 3px solid transparent;
  }

  .court-index__item:hover,
  .court-index__item.is-active {
    border-top-color: var(--court-gold);
    border-left-color: transparent;
  }
}

@media (max-width: 700px) {
  .jurisdiction-hero {
    min-height: 540px;
    margin-top: 0;
  }

  .jurisdiction-hero__image {
    object-position: 38% center;
  }

  .jurisdiction-hero__shade {
    background: linear-gradient(0deg, rgba(3, 20, 36, 0.94), rgba(3, 20, 36, 0.08) 82%);
  }

  .jurisdiction-hero__content {
    top: auto;
    right: 18px;
    bottom: 24px;
    left: 18px;
    width: auto;
    padding: 25px 23px;
    transform: none;
  }

  .jurisdiction-hero h1 {
    font-size: 22px;
  }

  .jurisdiction-controls {
    padding-top: 70px;
  }

  .latest-update {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .latest-update__stamp {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid #e8dda8;
  }

  .latest-update__label {
    margin: 0;
  }

  .jurisdiction-search-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .jurisdiction-search-note {
    margin: 0;
  }

  .jurisdiction-search input {
    font-size: 16px;
  }

  .region-filters {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    margin-right: 0;
    padding: 0;
    overflow: visible;
  }

  .region-filter {
    flex: 0 1 auto;
    max-width: 100%;
  }

  .jurisdiction-explorer-wrap {
    padding: 4px 0 270px;
  }

  .jurisdiction-explorer {
    gap: 26px;
    margin: 0 12px;
    padding: 18px;
  }

  .court-index__item {
    display: flex;
    flex: none;
    flex-direction: column;
    justify-content: space-between;
    width: auto;
    min-width: 0;
    min-height: 112px;
    padding: 14px;
    border-top: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 3px solid transparent;
  }

  .court-index__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }

  .court-index__item:nth-child(2n) {
    border-right: 0;
  }

  .court-index__item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .court-index__item:hover,
  .court-index__item.is-active {
    border-top-color: transparent;
    border-left-color: var(--court-gold);
  }

  .court-index__pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 13px 14px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
  }

  .court-index__pager strong {
    color: var(--court-gold);
  }

  .court-index__pager button {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    cursor: pointer;
    font-size: 17px;
  }

  .court-index__pager button:disabled {
    opacity: 0.3;
    cursor: default;
  }

  .court-route__header {
    margin-bottom: 28px;
  }

  .court-route__header h2 {
    font-size: 22px;
  }

  .route-scroll {
    overflow: visible;
    padding: 0;
  }

  .route-timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
  }

  .route-timeline::before {
    display: none;
  }

  .route-step__number {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    font-size: 12px;
  }

  .route-step.is-current .route-step__number {
    box-shadow: 0 0 0 5px rgba(255, 208, 74, 0.13);
  }

  .route-step__card {
    min-height: 0;
    padding: 18px;
  }

  .route-step__card h3 {
    margin: 14px 0 16px;
  }

  .route-step__website {
    margin: -6px 0 14px;
  }

  .route-step:first-child .route-step__card h3 {
    margin-bottom: 0;
  }

  .court-route__result {
    align-items: flex-start;
    flex-direction: column;
  }

}

@media (max-width: 500px) {
  .jurisdiction-hero {
    min-height: 430px;
  }

  .jurisdiction-hero__content {
    right: 15px;
    bottom: 20px;
    left: 15px;
    padding: 20px 15px;
  }

  .jurisdiction-hero h1,
  .court-route__header h2,
  .court-route__empty h2 {
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 1.2;
  }

  .jurisdiction-hero__content > p:last-child {
    margin-top: 16px;
    font-size: 12px;
    font-weight: 400;
  }

  .jurisdiction-search,
  .jurisdiction-search input {
    width: 100%;
    max-width: 250px;
  }

  .court-route__header {
    flex-direction: column;
    margin-bottom: 22px;
  }

  .jurisdiction-explorer {
    gap: 22px;
    margin: 0 8px;
    padding: 14px;
    border-radius: 16px;
  }

  .court-index__summary,
  .court-index__item {
    padding-right: 14px;
    padding-left: 14px;
  }

  .route-step__card {
    padding: 16px;
    border-radius: 14px;
  }

  .court-route__result {
    padding: 14px 16px;
    font-size: 12px;
  }

  .jurisdiction-controls {
    padding-top: 0;
  }

  .jurisdiction-explorer-wrap {
    padding-bottom: 200px;
  }
}

@media (max-width: 400px) {
  .jurisdiction-hero__content > p:last-child {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .latest-update__court,
  .region-filter,
  .court-index__item {
    transition: none;
  }
}
