/* Reference layout for the English Schools index. */
main.schools-hub-page[data-schools-reference] .schools-hub {
  --sh-blue:#0766e8;
  --sh-navy:#0b214b;
  --sh-line:#dbe7f5;
  --sh-muted:#435a76;
  --sr-gutter:clamp(14px,2.2vw,34px);
  --sr-soft:#f5f9fe;
  color:var(--sh-navy);
  font-size:14px;
  line-height:1.42;

  & :is(.sh-hero-card,.sh-wrap) {
    width:min(1480px,calc(100% - var(--sr-gutter) * 2));
    max-width:none;
    margin-inline:auto;
  }

  & .sh-hero {
    position:relative;
    min-height:215px;
    isolation:isolate;
    overflow:hidden;
    padding:0;
    border:0;
    background:#eef5fc;
  }

  & :is(.sr-hero-image,.sr-hero-photo) {
    position:absolute;
    inset:0 0 0 auto;
    z-index:-2;
    display:block;
    width:68%;
    height:100%;
    object-fit:cover;
    object-position:60% 57%;
  }

  & :is(.sr-hero-image,.sr-hero-photo)>img {
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:60% 57%;
  }

  & .sh-hero::before {
    position:absolute;
    inset:0;
    z-index:-1;
    background:linear-gradient(90deg,#f5f9fd 0%,#f5f9fd 32%,#f5f9fde3 47%,#f5f9fd52 66%,#f5f9fd00 82%);
    content:'';
    pointer-events:none;
  }

  & .sh-hero-card {
    top:0;
    z-index:1;
    margin:0 auto;
    padding:16px 0 19px;
    border:0;
    border-radius:0;
    background:none;
    box-shadow:none;
  }

  & .sh-crumb {
    gap:5px;
    margin-bottom:7px;
    color:#304e71;
    font-size:12px;
  }

  & .sh-hero-card h1 {
    max-width:72%;
    margin:0 0 3px;
    color:var(--sh-navy);
    font-size:clamp(34px,4.1vw,61px);
    line-height:1.05;
    font-weight:850;
    letter-spacing:-.045em;
  }

  & .sh-hero-card h2 {
    max-width:68%;
    margin:0 0 4px;
    font-size:clamp(19px,2.1vw,28px);
    line-height:1.18;
    font-weight:800;
  }

  & .sh-hero-card>p:not(.sh-update) {
    max-width:min(61%,660px);
    color:#294664;
    font-size:clamp(13px,1.36vw,17px);
    line-height:1.38;
  }

  & .sh-trust {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:5px 7px;
    max-width:min(77%,900px);
    margin:9px 0 0;
  }

  & :is(.sh-trust span,.sh-hero-card .sh-update) {
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-height:26px;
    padding:4px 7px;
    border:1px solid #d6e5f7;
    border-radius:6px;
    background:#ffffffc9;
    color:#1b3c63;
    font-size:11px;
    line-height:1.2;
  }

  & .sh-trust .sh-icon {
    width:15px;
    height:15px;
  }

  & .sh-hero-card .sh-update {
    margin:5px 0 0;
  }

  & .sh-hero-actions {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:7px;
    margin-top:10px;
  }

  & .sh-hero-actions>:is(.sh-primary,.sh-outline) {
    flex:0 1 auto;
    min-height:36px;
    padding:7px 12px;
    border-radius:13px;
    font-size:12px;
    font-weight:750;
  }

  & :is(.sr-hero-signature,.sr-hero-annotation) {
    display:inline-block;
    margin:0 0 0 9px;
    transform:rotate(-5deg);
    color:#1763bd;
    font:italic 700 14px/1.22 'Segoe Print','Brush Script MT',cursive;
  }

  & .sh-wrap {
    padding:16px 0 18px;
  }

  & .sh-layout {
    grid-template-columns:minmax(0,1fr) clamp(195px,21.6vw,272px);
    align-items:start;
    gap:clamp(12px,1.55vw,20px);
  }

  & .sh-main {
    gap:11px;
  }

  & :is(.sh-section,.sh-panel,.sh-shortlist,.sh-filter-panel,.sh-side-actions) {
    min-width:0;
    padding:10px;
    border-color:var(--sh-line);
    border-radius:8px;
    background:#fff;
  }

  & :is(.sh-section,.sh-panel) h2 {
    font-size:clamp(17px,1.65vw,23px);
    line-height:1.16;
  }

  & .sh-section>header {
    gap:5px 12px;
    margin-bottom:7px;
  }

  & .sh-section>header p {
    color:var(--sh-muted);
    font-size:12px;
    line-height:1.35;
  }

  & :is(.sr-map-panel,.sr-map-section) {
    position:relative;
    min-width:0;
    padding:0;
    overflow:hidden;
    border:1px solid #cbdff4;
    border-radius:8px;
    background:#eaf5fe;
  }

  & :is(.sr-map-panel,.sr-map-section) .sh-map {
    position:relative;
    inset:auto;
    width:100%;
    height:clamp(235px,25vw,368px);
    min-height:0;
  }

  & :is(.sr-map-panel,.sr-map-section) .sh-map-svg {
    min-height:0;
    width:100%;
    height:100%;
    margin:0;
  }

  & .sr-map-panel .sh-map-school text {
    font-size:15px;
  }

  & .sr-map-panel .sh-map-school .sh-map-campus {
    font-size:12px;
  }

  & .sr-map-toolbar {
    position:relative;
    z-index:460;
    display:flex;
    align-items:center;
    gap:7px;
    min-width:0;
    padding:5px 6px;
    border-bottom:1px solid #d1e4f5;
    background:#f6faff;
  }

  & .sr-map-toolbar :is(.sr-map-toggle,.sr-map-filters) {
    display:flex;
    align-items:center;
    gap:4px;
    min-width:0;
  }

  & .sr-map-toggle {
    flex:0 0 auto;
  }

  & .sr-map-filters {
    flex:1;
    overflow:auto;
    scrollbar-width:thin;
  }

  & .sr-map-toolbar :is(a,button,select) {
    flex:0 0 auto;
    min-height:29px;
    padding:4px 7px;
    border:1px solid #d5e5f7;
    border-radius:5px;
    background:#fff;
    color:#193c66;
    font-size:11px;
    line-height:1.2;
    white-space:nowrap;
  }

  & .sr-map-toolbar :is([aria-pressed=true],[aria-current=true]) {
    border-color:var(--sh-blue);
    background:var(--sh-blue);
    color:white;
  }

  & :is(.sr-map-panel,.sr-map-section) .sh-map-controls {
    top:8px;
    right:8px;
  }

  & :is(.sr-map-panel,.sr-map-section) .sh-map-controls button {
    width:32px;
    min-height:33px;
    font-size:19px;
  }

  & :is(.sr-map-panel,.sr-map-section) .sh-map-key {
    left:7px;
    bottom:7px;
    max-width:min(260px,calc(100% - 47px));
    padding:6px 8px;
  }

  & .sh-map-key small {
    font-size:11px;
  }

  & .sh-map-key button {
    min-height:26px;
    padding:2px 0;
  }

  & .sr-map-note {
    display:flex;
    align-items:center;
    gap:6px;
    padding:7px 8px;
    border-top:1px solid #cbdff4;
    background:#eaf5fe;
    color:#25476a;
    font-size:12px;
    line-height:1.35;
  }

  & .sr-map-note .sh-icon {
    width:15px;
    height:15px;
  }

  & :is(.sr-map-list,[data-sr-map-list]),
  & [data-sr-map-list]>:is(ul,ol) {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));
    gap:6px;
    margin:0;
    padding:7px;
    list-style:none;
  }

  & [data-sr-map-list]>:is(ul,ol) {
    padding:0;
  }

  & :is(.sr-map-list,[data-sr-map-list]) li {
    min-width:0;
    margin:0;
    padding:7px;
    border:1px solid var(--sh-line);
    border-radius:5px;
    background:#fff;
    list-style:none;
  }

  & :is(.sr-map-list,[data-sr-map-list]) a {
    display:block;
    font-size:12px;
    font-weight:750;
    line-height:1.3;
  }

  & [data-sr-map-list] p {
    margin:3px 0 4px;
    color:var(--sh-muted);
    font-size:11px;
    line-height:1.32;
  }

  & [data-sr-map-list] button {
    min-height:28px;
    padding:3px 6px;
    border:1px solid var(--sh-line);
    border-radius:4px;
    background:#f1f7ff;
    color:#0759c7;
    font-size:11px;
  }

  & .sh-type-grid,
  & .sh-card-grid {
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
  }

  & .sh-type-card {
    display:flex;
    flex-direction:column;
    min-width:0;
    border-radius:7px;
    background:#fff;
  }

  & .sh-type-card>img {
    height:clamp(59px,6.6vw,103px);
  }

  & .sh-type-card>div {
    display:flex;
    flex:1;
    flex-direction:column;
    gap:5px;
    min-width:0;
    min-height:0;
    padding:8px 7px 7px;
  }

  & .sh-type-card h3 {
    margin:0;
    padding-left:22px;
    font-size:clamp(13px,1.35vw,17px);
    line-height:1.18;
  }

  & .sh-type-card .sh-icon {
    display:block;
    top:8px;
    left:7px;
    width:17px;
    height:17px;
  }

  & .sh-type-card p {
    color:#334d6b;
    font-size:12px;
    line-height:1.34;
  }

  & .sh-type-card .sr-type-question {
    margin-top:1px;
    color:#294664;
    font-size:11.5px;
  }

  & .sh-type-card .sr-type-question strong {
    color:var(--sh-navy);
  }

  & .sh-type-card>div>span:not(.sh-type-illustration) {
    margin-top:auto;
    padding:4px 5px;
    border-radius:4px;
    background:#e0edff;
    color:#0759c7;
    font-size:11px;
    line-height:1.25;
    text-align:center;
  }

  & .sh-filter-panel {
    padding:7px;
    background:#f9fbfe;
  }

  & .sh-filter-panel form {
    grid-template-columns:minmax(125px,1.45fr) repeat(6,minmax(71px,1fr));
    gap:5px 6px;
  }

  & .sh-filter-panel form label {
    gap:3px;
    font-size:11px;
    line-height:1.24;
  }

  & .sh-filter-panel :is(input:not([type=checkbox]),select) {
    min-height:33px;
    padding:4px 5px;
    font-size:12px!important;
  }

  & .sh-filter-panel .sh-checkbox {
    gap:5px;
    min-height:32px;
  }

  & .sh-filter-panel :is(.sh-primary,.sh-reset) {
    min-height:33px;
    padding:4px 6px;
    font-size:11px;
  }

  & .sh-filter-panel>p {
    margin:6px 0 0;
    color:var(--sh-muted);
    font-size:11px;
    line-height:1.35;
  }

  & #featured-schools {
    padding:0;
    border:0;
    background:none;
  }

  & .sh-school-card {
    border-radius:7px;
    box-shadow:0 1px 3px #1d4c7710;
  }

  & .sh-photo {
    height:clamp(47px,5.3vw,85px);
  }

  & .sh-card-body {
    padding:7px 7px 6px;
  }

  & .sh-school-card h3 {
    min-height:0;
    margin-bottom:3px;
    color:var(--sh-navy);
    font-size:clamp(13px,1.27vw,17px);
    line-height:1.18;
    letter-spacing:-.027em;
  }

  & .sh-location,
  & .sh-ages {
    margin-bottom:4px!important;
    font-size:11px;
    line-height:1.3;
  }

  & .sh-tags {
    gap:3px;
    margin-bottom:4px;
  }

  & .sh-tags span {
    padding:2px 5px;
    border-radius:8px;
    font-size:10px;
    line-height:1.2;
  }

  & .sh-fee-evidence {
    align-items:flex-start;
    font-size:11px;
    line-height:1.35;
  }

  & .sh-fee-evidence i {
    margin-top:2px;
  }

  & .sh-card-price {
    margin:4px 0 6px!important;
    font-size:12px;
    line-height:1.33;
  }

  & .sh-card-price small {
    font-size:10.5px;
  }

  & .sh-card-actions {
    grid-template-columns:minmax(0,1.12fr) minmax(0,1fr) minmax(0,.7fr) 24px;
    gap:3px;
  }

  & .sh-card-actions>:is(a,button) {
    min-height:28px;
    padding:3px 2px;
    font-size:clamp(10px,1vw,12px);
    line-height:1.2;
  }

  & .sh-card-actions .sh-icon {
    width:13px;
    height:13px;
  }

  & .sh-photo-credit {
    margin-top:5px;
    color:var(--sh-muted);
    font-size:10px;
  }

  & .sh-sidebar {
    gap:8px;
  }

  & .sh-sidebar :is(.sh-panel,.sh-shortlist,.sh-side-actions) {
    padding:9px;
    background:#f7faff;
  }

  & .sh-sidebar .sh-panel h2,
  & .sh-sidebar .sh-shortlist h2 {
    gap:6px;
    margin:0 0 6px;
    font-size:15px;
    line-height:1.2;
  }

  & .sh-sidebar .sh-panel h2 .sh-icon {
    width:17px;
    height:17px;
  }

  & .sh-sidebar .sh-panel :is(p,li),
  & .sh-sidebar .sh-shortlist p {
    margin:4px 0;
    color:#3e5573;
    font-size:12px;
    line-height:1.36;
  }

  & .sh-sidebar .sh-fee-legend :is(strong,small) {
    font-size:11px;
    line-height:1.3;
  }

  & .sh-sidebar .sh-shortlist {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:5px;
    align-items:start;
  }

  & .sh-sidebar .sh-slots {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
  }

  & .sh-sidebar .sh-slot {
    min-height:39px;
    padding:3px;
  }

  & .sh-sidebar .sh-shortlist:has(.sr-add-schools) [data-sh-slot]:not(.is-filled) {
    display:none;
  }

  & .sh-sidebar .sh-shortlist:has(.sr-add-schools):not(:has(.sh-slot.is-filled)) :is(.sh-slots,[data-sh-compare-link],[data-sh-clear-shortlist]) {
    display:none;
  }

  & .sh-sidebar .sh-shortlist :is(.sh-primary,.sh-reset,.sr-add-schools) {
    min-height:29px;
    margin:0;
    padding:5px 6px;
  }

  & .sh-sidebar .sr-add-schools {
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:5px;
    background:#dcecff;
    color:#0759c7;
    font-size:12px;
    font-weight:750;
    text-align:center;
  }

  & .sh-sidebar .sh-side-actions {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
  }

  & .sh-sidebar .sh-side-actions>:is(button,a) {
    justify-content:center;
    gap:4px;
    min-height:31px;
    padding:4px 3px;
    border:1px solid var(--sh-line);
    border-radius:4px;
    background:#fff;
    font-size:11px;
    line-height:1.23;
  }

  & .sh-sidebar .sh-side-actions>:is([data-sr-share-status],[data-sr-share-url]) {
    grid-column:1/-1;
    min-width:0;
  }

  & .sh-sidebar .sh-side-actions>[data-sr-share-url] {
    min-height:31px;
    padding:4px 6px;
    font-size:12px!important;
  }

  & .sh-sidebar .sh-side-actions .sh-icon {
    width:14px;
    height:14px;
  }

  & .sh-tools {
    grid-template-columns:minmax(0,1.15fr) minmax(0,.92fr) minmax(0,1.1fr);
    align-items:start;
    gap:9px;
    margin-top:12px;
  }

  & .sh-tools .sh-panel {
    padding:9px;
  }

  & .sh-tools .sh-panel h2 {
    gap:6px;
    margin-bottom:7px;
    font-size:16px;
    line-height:1.19;
  }

  & .sh-tools .sh-panel h2 .sh-icon {
    width:18px;
    height:18px;
  }

  & .sh-tools :is(select,input:not([type=checkbox])) {
    min-height:30px;
    padding:4px 5px;
    font-size:12px!important;
  }

  & .sh-tools [data-sh-commute] {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }

  & .sh-tools [data-sh-commute]>:not(label) {
    grid-column:1/-1;
  }

  & .sh-tools :is(.sh-primary,.sh-outline,.sh-reset) {
    min-height:32px;
    padding:5px 7px;
  }

  & .sh-tools .sh-budget-fields {
    grid-template-columns:minmax(0,1fr);
    gap:4px;
  }

  & .sh-budget-fields label {
    grid-template-columns:minmax(0,1fr) minmax(62px,30%);
    align-items:center;
    font-size:11px;
  }

  & .sh-tools .sh-budget-details {
    padding:0 6px;
  }

  & .sh-tools [data-sh-budget] {
    grid-template-columns:minmax(0,1fr) minmax(96px,.62fr);
    align-items:start;
    gap:6px;
  }

  & .sh-tools [data-sh-budget]>label {
    grid-column:1/-1;
  }

  & .sh-tools [data-sh-budget]>.sh-budget-details {
    grid-column:1;
    grid-row:3/span 2;
  }

  & .sh-tools [data-sh-budget]>:is(.sh-budget-results,[data-sh-budget-reset]) {
    grid-column:2;
  }

  & .sh-tools .sh-budget-results>div {
    display:grid;
    gap:1px;
  }

  & .sh-tools .sh-budget-results dd {
    text-align:left;
    overflow-wrap:anywhere;
    white-space:normal;
  }

  & .sh-budget-details>summary {
    min-height:30px;
    padding:6px 0;
  }

  & .sh-budget-results>div {
    padding:3px 0;
    font-size:12px;
    line-height:1.3;
  }

  & .sh-budget-results>div:last-child {
    font-size:13px;
  }

  & :is(table.sr-compare,.sr-compare table) {
    width:100%;
    border-collapse:collapse;
    color:#294664;
    font-size:12px;
    line-height:1.3;
  }

  & .sr-compare :is(td,th) {
    padding:5px 6px;
    border-bottom:1px solid #e0ebf8;
    text-align:left;
    vertical-align:top;
  }

  & .sr-compare tr:nth-child(odd) {
    background:#f1f7fe;
  }

  & .sr-compare th {
    width:36%;
    color:#173959;
  }

  & .sr-cta {
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:7px 12px;
    margin-top:12px;
    padding:13px;
    border-radius:8px;
    background:#e2effe;
    color:var(--sh-navy);
  }

  & .sr-cta h2 {
    margin:0;
    font-size:clamp(16px,1.8vw,24px);
    line-height:1.2;
  }

  & .sr-cta :is(.sh-primary,.sh-outline) {
    min-height:34px;
    padding:5px 9px;
  }

  & .sr-supplement {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:12px;
  }

  & .sr-supplement>:is(#top-schools-by-area,.sh-subnav) {
    grid-column:1/-1;
  }

  & .sr-supplement .sh-pathway-panel {
    grid-column:auto;
  }

  & .sr-supplement .sh-subnav {
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:3px;
    padding:3px;
    border:1px solid var(--sh-line);
    border-radius:6px;
    white-space:normal;
  }

  & .sr-supplement .sh-subnav a {
    min-height:34px;
    padding:5px 8px;
  }
}

@media (max-width:1110px) {
  main.schools-hub-page[data-schools-reference] .schools-hub .sh-filter-panel form {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media (max-width:930px) {
  main.schools-hub-page[data-schools-reference] .schools-hub {
    & .sh-layout {
      grid-template-columns:minmax(0,1fr) minmax(176px,24%);
      gap:10px;
    }

    & .sh-card-grid {
      grid-template-columns:repeat(3,minmax(0,1fr));
    }

    & .sh-type-grid {
      grid-template-columns:repeat(2,minmax(0,1fr));
    }

    & .sh-tools {
      grid-template-columns:repeat(2,minmax(0,1fr));
    }

    & .sh-tools .sh-pathway-panel {
      grid-column:1/-1;
    }
  }
}

@media (max-width:740px) {
  main.schools-hub-page[data-schools-reference] .schools-hub {
    & .sh-hero {
      min-height:0;
    }

    & .sh-hero-card {
      padding:14px 0 48px;
    }

    & :is(.sr-hero-image,.sr-hero-photo) {
      inset:auto 0 0;
      width:100%;
      height:158px;
      object-position:center 57%;
    }

    & .sh-hero::before {
      background:linear-gradient(180deg,#f5f9fd 0%,#f5f9fd 52%,#f5f9fdc9 73%,#f5f9fd18 100%);
    }

    & .sh-hero-card :is(h1,h2,.sh-trust),
    & .sh-hero-card>p:not(.sh-update) {
      max-width:100%;
    }

    & :is(.sr-hero-signature,.sr-hero-annotation) {
      display:none;
    }

    & .sh-layout {
      grid-template-columns:minmax(0,1fr);
    }

    & .sh-sidebar {
      grid-template-columns:repeat(2,minmax(0,1fr));
      align-items:start;
    }
  }
}

@media (max-width:520px) {
  main.schools-hub-page[data-schools-reference] .schools-hub {
    & .sh-wrap {
      padding-top:10px;
    }

    & .sh-hero-card h1 {
      font-size:clamp(30px,8vw,41px);
    }

    & .sh-hero-actions>:is(.sh-primary,.sh-outline) {
      min-height:36px;
    }

    & .sr-map-toolbar {
      flex-wrap:wrap;
    }

    & .sr-map-filters {
      flex:1 1 100%;
    }

    & :is(.sr-map-panel,.sr-map-section) .sh-map {
      height:244px;
    }

    & .sr-map-panel .sh-map :is([data-sh-map-fallback],.sh-map-live) {
      bottom:65px;
      height:calc(100% - 65px);
    }

    & .sr-map-panel .sh-map-key {
      right:6px;
      bottom:4px;
      left:6px;
      height:auto;
      max-width:none;
      padding:4px 6px;
      border-radius:4px;
    }

    & .sr-map-panel .sh-map-credit {
      bottom:67px;
    }

    & .sh-filter-panel form,
    & .sh-card-grid {
      grid-template-columns:repeat(2,minmax(0,1fr));
    }

    & .sh-card-actions {
      grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
    }

    & .sh-card-actions>:is(a,button) {
      min-height:31px;
      font-size:11px;
    }

    & .sh-tools {
      grid-template-columns:minmax(0,1fr);
    }

    & .sr-supplement {
      grid-template-columns:minmax(0,1fr);
    }
  }
}

@media (max-width:370px) {
  main.schools-hub-page[data-schools-reference] .schools-hub .sh-sidebar {
    grid-template-columns:minmax(0,1fr);
  }
}

@media print {
  main.schools-hub-page[data-schools-reference] .schools-hub :is(.sr-map-toolbar,.sr-cta,.sr-hero-image) {
    display:none!important;
  }
}
