:root {
  --sv-primary: #003b71;
  --sv-accent: #00a6b2;
  --sv-gold: #f6b221;
  --sv-dark: #1f2933;
  --sv-light: #f5f8fb;
  --sv-white: #ffffff;
  --sv-border: rgba(0, 59, 113, 0.16);
  --sv-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--sv-dark);
  background: var(--sv-light);
  font-family: Arial, Helvetica, sans-serif;
}

.sv-explorer {
  background: var(--sv-light);
  min-height: 100vh;
}

.sv-hero {
  color: var(--sv-white);
  background:
    linear-gradient(110deg, rgba(0, 59, 113, 0.96), rgba(0, 166, 178, 0.72)),
    url("https://mastertheschedule.com/misc-apps/schoolfinder/images/schools/default-school.jpg") center/cover;
  padding: 64px 24px;
}

.sv-hero__content,
.sv-finder {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.sv-hero__content {
  text-align: center;
}

.sv-hero h1 {
  max-width: 760px;
  margin: 0 auto;
  color: var(--sv-white);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
}

.sv-hero p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.15rem;
}

.sv-address-control {
  position: relative;
  display: grid;
  gap: 8px;
}

.sv-address-control label {
  color: var(--sv-primary);
  font-weight: 800;
}

.sv-address-control input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  padding: 10px 12px;
  font: 12px/1.3 Arial, Helvetica, sans-serif;
}

.sv-address-suggestions {
  position: absolute;
  top: 74px;
  z-index: 20;
  width: 100%;
  max-height: 248px;
  overflow: auto;
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  background: var(--sv-white);
  box-shadow: var(--sv-shadow);
}

.sv-address-suggestion {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--sv-border);
  color: var(--sv-dark);
  background: var(--sv-white);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
  font: 0.95rem/1.35 Arial, Helvetica, sans-serif;
}

.sv-address-suggestion:hover,
.sv-address-suggestion:focus {
  color: var(--sv-white);
  background: var(--sv-primary);
}

.sv-address-status {
  min-height: 1.25em;
  margin: 0;
  color: #52616f;
  font-size: 0.9rem;
}

.sv-address-results {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  background: var(--sv-white);
}

.sv-address-results h2 {
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--sv-primary);
}

.sv-address-results__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.sv-eyebrow {
  margin: 0 0 8px;
  color: var(--sv-gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sv-finder {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 24px 56px;
}

.sv-filters,
.sv-school-card {
  background: var(--sv-white);
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 59, 113, 0.08);
}

.sv-filters {
  align-self: start;
  display: grid;
  gap: 18px;
  padding: 20px;
  position: sticky;
  top: 16px;
}

.sv-field {
  display: grid;
  gap: 7px;
}

.sv-field label,
.sv-programs summary {
  color: var(--sv-primary);
  font-weight: 800;
}

.sv-field input,
.sv-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  color: var(--sv-dark);
  background: var(--sv-white);
  padding: 10px 12px;
  font: inherit;
}

.sv-field input[type="search"] {
  font: 12px/1.3 Arial, Helvetica, sans-serif;
}

.sv-field input:focus,
.sv-field select:focus,
.sv-button:focus {
  outline: 3px solid rgba(246, 178, 33, 0.45);
  outline-offset: 2px;
}

.sv-filter-grid {
  display: grid;
  gap: 14px;
}

.sv-check,
.sv-program-mode label,
.sv-program-list label,
.sv-location-list label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.35;
}

.sv-programs {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sv-filter-tree {
  border-top: 1px solid var(--sv-border);
  padding-top: 14px;
}

.sv-filter-tree summary {
  cursor: pointer;
  list-style: none;
}

.sv-filter-tree summary::-webkit-details-marker {
  display: none;
}

.sv-filter-tree summary::after {
  content: '+';
  float: right;
  font-size: 1.25rem;
  line-height: 0.9;
}

.sv-filter-tree[open] summary::after {
  content: '-';
}

.sv-filter-tree > :not(summary) {
  margin-top: 12px;
}

.sv-program-mode,
.sv-program-list,
.sv-location-list {
  display: grid;
  gap: 10px;
}

.sv-program-list {
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.sv-results {
  min-width: 0;
}

.sv-results__top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.sv-results h2 {
  margin: 0;
  color: var(--sv-primary);
  font-size: 1.6rem;
}

.sv-active-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sv-chip,
.sv-program-tag,
.sv-award {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.sv-chip {
  background: rgba(0, 166, 178, 0.12);
  color: var(--sv-primary);
  padding: 6px 10px;
}

.sv-state {
  background: var(--sv-white);
  border: 1px dashed var(--sv-border);
  border-radius: 8px;
  padding: 22px;
  color: var(--sv-primary);
  font-weight: 800;
  text-align: center;
}

.sv-state--error {
  color: #8a1f11;
  background: #fff6f4;
  border-color: rgba(138, 31, 17, 0.3);
}

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

.sv-school-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.sv-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, var(--sv-primary), var(--sv-accent));
}

.sv-card-video {
  height: auto;
}

.sv-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.sv-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.sv-card-top h3 {
  margin: 0;
  color: var(--sv-primary);
  font-size: 1.3rem;
}

.sv-school-title {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.sv-school-logo {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  object-fit: contain;
  background: var(--sv-white);
  padding: 4px;
}

.sv-card-badges {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.sv-profile-icon {
  appearance: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--sv-border);
  border-radius: 999px;
  color: var(--sv-primary);
  background: var(--sv-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sv-profile-icon:hover,
.sv-profile-icon:focus {
  color: var(--sv-white);
  background: var(--sv-primary);
}

.sv-profile-icon__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font: 900 0.9rem/1 Arial, Helvetica, sans-serif;
}

.sv-featured {
  flex: 0 0 auto;
  color: var(--sv-primary);
  background: var(--sv-gold);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.sv-card-meta,
.sv-card-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #52616f;
  font-size: 0.94rem;
}

.sv-card-narrative {
  margin: 0;
  color: #314252;
  line-height: 1.5;
}

.sv-card-details {
  border-top: 1px solid var(--sv-border);
  padding-top: 10px;
}

.sv-card-details summary {
  color: var(--sv-primary);
  cursor: pointer;
  font-weight: 900;
}

.sv-detail-content {
  display: grid;
  gap: 14px;
  padding-top: 12px;
}

.sv-full-narrative {
  margin: 0;
  color: #314252;
  line-height: 1.55;
}

.sv-detail-group {
  display: grid;
  gap: 8px;
}

.sv-detail-group h4 {
  margin: 0;
  color: var(--sv-primary);
  font-size: 0.94rem;
}

.sv-detail-pills,
.sv-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sv-detail-pills span,
.sv-detail-link {
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 10px;
}

.sv-detail-pills span {
  color: #314252;
  background: var(--sv-light);
}

.sv-detail-link {
  color: var(--sv-primary);
  background: rgba(0, 59, 113, 0.08);
  text-decoration: none;
}

.sv-detail-link:hover {
  background: rgba(0, 166, 178, 0.14);
}

.sv-stat-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.sv-stat-list div {
  display: grid;
  gap: 3px;
}

.sv-stat-list dt {
  color: #52616f;
  font-size: 0.8rem;
  font-weight: 800;
}

.sv-stat-list dd {
  margin: 0;
  color: var(--sv-dark);
  font-weight: 900;
}

.sv-stat-list dd span {
  display: block;
  margin-top: 2px;
  color: #52616f;
  font-weight: 400;
}

.sv-image-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sv-image-strip img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

.sv-tag-list,
.sv-award-list,
.sv-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sv-program-tag {
  color: var(--sv-primary);
  background: rgba(0, 166, 178, 0.13);
  padding: 7px 10px;
  text-decoration: none;
}

.sv-award {
  color: #6c4a00;
  background: rgba(246, 178, 33, 0.2);
  padding: 6px 9px;
  text-decoration: none;
}

.sv-program-tag[href]:hover,
.sv-program-tag[href]:focus {
  color: var(--sv-white);
  background: var(--sv-primary);
}

.sv-award[href]:hover,
.sv-award[href]:focus {
  color: #4d3500;
  background: var(--sv-gold);
}

.sv-program-details {
  display: grid;
  gap: 10px;
}

.sv-program-details div {
  padding: 10px 12px;
  border-left: 3px solid var(--sv-accent);
  background: var(--sv-light);
}

.sv-program-details strong {
  color: var(--sv-primary);
}

.sv-program-details p {
  margin: 4px 0 0;
  color: #314252;
  line-height: 1.45;
}

.sv-rich-program-detail {
  margin-top: 6px;
}

.sv-rich-program-detail p,
.sv-rich-program-detail ul,
.sv-rich-program-detail ol {
  margin: 5px 0;
}

.sv-rich-program-detail a {
  color: var(--sv-primary);
  font-weight: 800;
}
}

.sv-card-actions {
  margin-top: auto;
}

.sv-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  color: var(--sv-white);
  background: var(--sv-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.sv-button:hover {
  background: #002f5a;
}

.sv-button--accent {
  background: var(--sv-accent);
}

.sv-button--gold {
  color: var(--sv-primary);
  background: var(--sv-gold);
}

.sv-button--ghost {
  color: var(--sv-primary);
  background: var(--sv-white);
  border: 1px solid var(--sv-border);
}

.sv-load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

.sv-modal-open {
  overflow: hidden;
}

.sv-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.sv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 23, 44, 0.68);
}

.sv-modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border-radius: 8px;
  background: var(--sv-white);
  box-shadow: var(--sv-shadow);
}

.sv-modal__close {
  position: sticky;
  top: 12px;
  left: calc(100% - 54px);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--sv-white);
  background: var(--sv-primary);
  cursor: pointer;
  font: 900 1.6rem/1 Arial, Helvetica, sans-serif;
}

.sv-modal__content {
  padding: 0 24px 24px;
}

.sv-profile {
  display: grid;
  gap: 18px;
}

.sv-profile__media {
  margin: 0 -24px;
}

.sv-profile__media .sv-card-image {
  max-height: 360px;
}

.sv-profile__header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.sv-profile__header h2 {
  margin: 0 0 8px;
  color: var(--sv-primary);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.sv-profile__logo {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  object-fit: contain;
  background: var(--sv-white);
  padding: 6px;
}

.sv-profile__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #314252;
  font-weight: 800;
}

.sv-boundary {
  display: grid;
  gap: 10px;
  margin: 0;
}

.sv-boundary__map {
  width: 100%;
  border: 1px solid var(--sv-border);
  border-radius: 8px;
  background: #dcecf4;
}

.sv-boundary__background {
  fill: #dcecf4;
}

.sv-boundary__shape {
  fill: rgba(0, 166, 178, 0.34);
  stroke: var(--sv-primary);
  stroke-width: 4;
  stroke-linejoin: round;
}

.sv-boundary__marker {
  fill: var(--sv-gold);
  stroke: var(--sv-primary);
  stroke-width: 4;
}

.sv-boundary figcaption,
.sv-boundary__source {
  margin: 0;
  color: #52616f;
  font-size: 0.88rem;
  line-height: 1.45;
}

.sv-muted {
  margin: 0;
  color: #6b7785;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .sv-finder {
    grid-template-columns: 1fr;
  }

  .sv-filters {
    position: static;
  }

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

@media (max-width: 720px) {
  .sv-hero {
    padding: 48px 18px;
  }

  .sv-finder {
    padding: 20px 16px 42px;
  }


  .sv-results__top {
    display: grid;
    align-items: start;
  }

  .sv-active-filters {
    justify-content: flex-start;
  }

  .sv-school-grid,
  .sv-filter-grid {
    grid-template-columns: 1fr;
  }

  .sv-card-top {
    display: grid;
  }

  .sv-card-badges {
    justify-content: space-between;
  }

  .sv-modal {
    padding: 12px;
  }

  .sv-modal__content {
    padding: 0 16px 18px;
  }

  .sv-profile__media {
    margin: 0 -16px;
  }

  .sv-profile__header {
    align-items: flex-start;
  }

  .sv-profile__logo {
    width: 60px;
    height: 60px;
  }
}
