/* School profile only. Load after the existing site and directory styles. */
.sd-school-profile {
  --school-green: #034730;
  --school-dark: #023b29;
  --school-gold: #c8ac72;
  --school-paper: #faf8f1;
  --school-white: #fffefb;
  --school-pale: #edf3ef;
  --school-ink: #173e2f;
  --school-muted: #536b5f;
  --school-line: #d4dfd7;
  --school-nav-top: 0px;
  --school-anchor-offset: 94px;
  box-sizing: border-box;
  width: 100%;
  max-width: 1284px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 42px) 56px;
  background: var(--school-paper);
  color: var(--school-ink);
  font: 16px/1.8 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.sd-school-profile *,
.sd-school-profile *::before,
.sd-school-profile *::after { box-sizing: border-box; }
.sd-school-profile [hidden] { display: none !important; }
.sd-school-profile :is(h1, h2, h3, p, li, dd, dt, figcaption, a) { overflow-wrap: anywhere; }
.sd-school-profile :is(h1, h2) {
  color: var(--school-ink);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 500;
  line-height: 1.3;
}
.sd-school-profile h2 { margin: 0 0 22px; font-size: clamp(28px, 3vw, 36px); }
.sd-school-profile h3 { margin: 28px 0 12px; font-size: 20px; line-height: 1.5; }
.sd-school-profile p { margin: 0 0 20px; color: var(--school-muted); }
.sd-school-profile a { color: var(--school-green); }
.sd-school-profile :is(button, a, summary) { touch-action: manipulation; }
.sd-school-profile :is(button, a, summary):focus-visible {
  outline: 3px solid #9b7428;
  outline-offset: 4px;
}
.sd-school-profile .sd-crumb {
  padding: 26px 0 16px;
  color: var(--school-muted);
  font-size: 13px;
  line-height: 1.7;
}
.sd-school-profile .sd-crumb a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #b9c9be;
  text-underline-offset: 4px;
}

.sd-school-profile .school-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .75fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: start;
  padding: 24px 0 44px;
}
.sd-school-profile .school-profile-intro { min-width: 0; }
.sd-school-profile .school-profile-intro :is(.eyebrow, .sd-eyebrow) {
  display: block;
  margin-bottom: 8px;
  color: #806126;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 1.6px;
}
.sd-school-profile .school-profile-intro .sd-code {
  margin: 0 0 12px;
  color: #806126;
  font-size: 13px;
  letter-spacing: 1.2px;
}
.sd-school-profile .school-profile-intro h1 {
  margin: 10px 0 17px;
  font-size: clamp(34px, 4.5vw, 61px);
  line-height: 1.14;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.sd-school-profile .school-profile-intro :is(.school-region, #sd-detail-region) {
  margin: 0 0 20px;
  font-size: 16px;
}
.sd-school-profile .school-profile-intro .school-lead {
  max-width: 710px;
  margin: 0;
  color: var(--school-muted);
  font-size: 18px;
  line-height: 1.85;
  white-space: pre-line;
}
.sd-school-profile .school-quick-facts {
  min-width: 0;
  padding: 13px 28px 18px;
  border: 1px solid var(--school-line);
  border-top: 4px solid var(--school-gold);
  border-radius: 2px;
  background: var(--school-pale);
}
.sd-school-profile .school-quick-facts h2 { margin: 12px 0 8px; font-size: 25px; }
.sd-school-profile .school-quick-facts dl { margin: 0; }
.sd-school-profile .school-quick-facts dl > div { min-width: 0; padding: 14px 0; border-bottom: 1px solid #cad8cf; }
.sd-school-profile .school-quick-facts dl > div:last-child { border-bottom: 0; padding-bottom: 4px; }
.sd-school-profile .school-quick-facts dt { margin: 0 0 4px; color: var(--school-muted); font-size: 13px; }
.sd-school-profile .school-quick-facts dd { margin: 0; color: var(--school-ink); font-size: 16px; line-height: 1.65; }

.sd-school-profile .school-cover { min-width: 0; margin: 0 0 34px; }
.sd-school-profile .school-photo-open {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--school-line);
  border-radius: 3px;
  background: var(--school-pale);
  cursor: zoom-in;
}
.sd-school-profile .school-photo-open img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  object-position: center;
}
.sd-school-profile .school-cover img {
  max-height: 530px;
  object-fit: contain;
}
.sd-school-profile :is(.school-cover, .school-photo-grid) figcaption {
  margin-top: 9px;
  color: var(--school-muted);
  font-size: 13px;
  line-height: 1.65;
}
.sd-school-profile figcaption a { text-decoration: underline; text-underline-offset: 3px; }

/* Explicitly override the original site's generic mobile nav rules. */
.sd-school-profile nav.school-section-nav {
  position: sticky;
  top: var(--school-nav-top);
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 15;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  margin: 0;
  padding: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--school-gold) transparent;
  border: 1px solid #b8cbbc;
  border-radius: 6px;
  background: var(--school-white);
  box-shadow: 0 5px 18px #03473012;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.sd-school-profile .school-section-nav > a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 3px;
  color: var(--school-green);
  font: inherit;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.sd-school-profile .school-section-nav > a:hover { background: var(--school-pale); }
.sd-school-profile .school-section-nav > a[aria-current="location"] {
  background: var(--school-green);
  color: white;
}
.sd-school-profile .school-section-nav > a:focus-visible {
  outline-color: var(--school-gold);
  outline-offset: -3px;
}

.sd-school-profile .school-detail-body { width: 100%; max-width: 960px; min-width: 0; margin: 0 auto; padding: 46px 0 0; }
.sd-school-profile .school-section {
  min-width: 0;
  margin: 0 0 39px;
  padding: 0 0 39px;
  border-bottom: 1px solid var(--school-line);
  scroll-margin-top: var(--school-anchor-offset);
}
.sd-school-profile .school-section:focus { outline: none; }
.sd-school-profile .school-section:focus-visible { outline: 2px solid #b09256; outline-offset: 8px; }
.sd-school-profile .school-section > :last-child { margin-bottom: 0; }
.sd-school-profile .school-section p { max-width: 900px; white-space: pre-line; }
.sd-school-profile .school-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 36px;
  margin: 0 0 24px;
}
.sd-school-profile .school-facts > div { min-width: 0; padding-top: 15px; border-top: 1px solid var(--school-line); }
.sd-school-profile .school-facts dt { margin: 0 0 7px; color: var(--school-muted); font-size: 14px; }
.sd-school-profile .school-facts dd { margin: 0; color: var(--school-ink); font-size: 17px; line-height: 1.75; white-space: pre-line; }
.sd-school-profile .sd-conditions { margin: 0 0 24px; padding-left: 22px; color: var(--school-muted); font-size: 16px; line-height: 1.85; }
.sd-school-profile .sd-conditions li { margin: 0 0 12px; padding-left: 3px; }
.sd-school-profile .sd-conditions li::marker { color: #947238; }
.sd-school-profile .school-features-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--school-ink);
  font-size: 17px;
}
.sd-school-profile .school-features-list li {
  min-width: 0;
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--school-gold);
  line-height: 1.7;
}
.sd-school-profile .school-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 20px;
  min-width: 0;
  margin: 0;
}
.sd-school-profile .school-photo-grid > figure { min-width: 0; margin: 0; }
.sd-school-profile .school-photo-grid > figure:only-child { grid-column: 1 / -1; }
.sd-school-profile .school-photo-grid img { aspect-ratio: 3 / 2; object-fit: contain; }
.sd-school-profile .school-photo-grid > figure:only-child img { max-height: 530px; aspect-ratio: auto; }
.sd-school-profile .school-map-details {
  min-width: 0;
  margin-top: 22px;
  padding: 0 22px;
  border: 1px solid var(--school-line);
  border-radius: 4px;
  background: #f4f6f0;
}
.sd-school-profile .school-map-details > summary {
  min-height: 52px;
  padding: 13px 0;
  color: var(--school-green);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.sd-school-profile .school-map-details[open] { padding-bottom: 18px; }
.sd-school-profile .school-map-details img { display: block; width: 100%; max-width: 100%; height: auto; margin: 10px 0 12px; border-radius: 2px; }
.sd-school-profile .school-map-details :is(p, figcaption) { margin: 10px 0 0; font-size: 12px; line-height: 1.6; }
.sd-school-profile .school-map-details a { text-decoration: underline; text-underline-offset: 3px; }
.sd-school-profile .school-map-details figure { min-width: 0; margin: 0; }

.sd-school-profile .school-section.school-inquiry {
  margin: 0 0 26px;
  padding: 34px 38px 38px;
  border: 0;
  border-top: 4px solid var(--school-gold);
  border-radius: 4px;
  background: var(--school-green);
  color: white;
}
.sd-school-profile .school-inquiry h2 { margin-bottom: 15px; color: white; }
.sd-school-profile .school-inquiry p { max-width: 700px; color: #e3ece6; }
.sd-school-profile .school-inquiry :is(.sd-code, .eyebrow) { color: #ead6aa; }
.sd-school-profile a.school-inquiry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 52px;
  max-width: 100%;
  margin-top: 3px;
  padding: 13px 24px;
  border: 1px solid var(--school-gold);
  border-radius: 3px;
  background: var(--school-gold);
  color: var(--school-dark);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
}
.sd-school-profile a.school-inquiry-button:hover { background: #dbc18b; border-color: #dbc18b; }
.sd-school-profile a.school-inquiry-button:focus-visible { outline-color: white; }
.sd-school-profile .sd-data-note { margin: 27px 0 20px; padding-left: 16px; border-left: 2px solid var(--school-gold); color: var(--school-muted); font-size: 13px; }
.sd-school-profile .sd-return { display: inline-block; max-width: 100%; min-height: 44px; margin: 0; padding: 9px 0; border: 0; color: var(--school-green); font-size: 14px; text-decoration: underline; text-decoration-color: var(--school-gold); text-underline-offset: 5px; }

/* The native dialog can sit immediately after main without any global selectors. */
#school-photo-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(1080px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d4dfd7;
  border-radius: 5px;
  background: #fffefb;
  color: #173e2f;
  box-shadow: 0 20px 70px #071c1655;
  font: 15px/1.6 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
#school-photo-dialog:not([open]),
#school-photo-dialog [hidden] { display: none !important; }
#school-photo-dialog::backdrop { background: #071c16df; }
#school-photo-dialog[data-fallback-open] { z-index: 1000; }
#school-photo-backdrop { position: fixed; inset: 0; z-index: 999; background: #071c16df; }
#school-photo-dialog * { box-sizing: border-box; min-width: 0; }
#school-photo-dialog :is(.school-photo-dialog-bar, .school-photo-dialog-controls, .photo-dialog-bar, .photo-dialog-controls) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
#school-photo-dialog :is(.school-photo-dialog-bar, .photo-dialog-bar) { margin-bottom: 15px; }
#school-photo-dialog :is(.school-photo-dialog-controls, .photo-dialog-controls) { margin-top: 16px; }
#school-photo-dialog button {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 15px;
  border: 1px solid #b8cbbc;
  border-radius: 3px;
  background: #edf3ef;
  color: #173e2f;
  font: inherit;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}
#school-photo-dialog button:hover { background: #e0ebe3; }
#school-photo-dialog button:focus-visible { outline: 3px solid #9b7428; outline-offset: 3px; }
#school-photo-dialog button:disabled { opacity: .45; cursor: default; }
#school-photo-large {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 65vh;
  max-height: 65dvh;
  margin: 0;
  background: #f1f4ee;
  object-fit: contain;
}
#school-photo-caption { margin: 14px 0 0; color: #536b5f; font: inherit; overflow-wrap: anywhere; white-space: pre-line; }
#school-photo-position { margin: 0; color: #536b5f; font-size: 14px; }
#school-photo-close { margin-left: auto; }

@media (max-width: 900px) {
  .sd-school-profile .school-profile-hero { grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); gap: 28px; }
  .sd-school-profile .school-quick-facts { padding-right: 22px; padding-left: 22px; }
}
@media (max-width: 700px) {
  .sd-school-profile { padding-right: 20px; padding-bottom: 36px; padding-left: 20px; }
  .sd-school-profile .sd-crumb { padding: 21px 0 10px; font-size: 12px; }
  .sd-school-profile .school-profile-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px 0 30px; }
  .sd-school-profile .school-profile-intro h1 { font-size: clamp(32px, 7vw, 43px); line-height: 1.2; }
  .sd-school-profile .school-profile-intro .school-lead { font-size: 17px; line-height: 1.8; }
  .sd-school-profile .school-quick-facts { padding: 7px 22px 18px; }
  .sd-school-profile .school-cover { margin-bottom: 25px; }
  .sd-school-profile .school-cover img { max-height: 420px; }
  .sd-school-profile nav.school-section-nav { gap: 3px; padding: 6px; border-radius: 4px; }
  .sd-school-profile .school-section-nav > a { padding: 10px 12px; font-size: 14px; }
  .sd-school-profile .school-detail-body { padding-top: 32px; }
  .sd-school-profile .school-section { margin-bottom: 29px; padding-bottom: 29px; }
  .sd-school-profile h2 { margin-bottom: 18px; font-size: 29px; }
  .sd-school-profile h3 { font-size: 19px; }
  .sd-school-profile .school-facts { gap: 20px; }
  .sd-school-profile .school-features-list { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .sd-school-profile .school-photo-grid { gap: 22px 14px; }
  .sd-school-profile .school-map-details { padding-right: 16px; padding-left: 16px; }
  .sd-school-profile .school-section.school-inquiry { padding: 25px 22px 28px; }
  .sd-school-profile a.school-inquiry-button { width: 100%; min-width: 0; padding-right: 16px; padding-left: 16px; }
  #school-photo-dialog { width: calc(100% - 20px); max-width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 14px; }
  #school-photo-large { max-height: 60dvh; }
  #school-photo-dialog button { padding-right: 12px; padding-left: 12px; font-size: 14px; }
}
@media (max-width: 480px) {
  .sd-school-profile .school-facts,
  .sd-school-profile .school-photo-grid { grid-template-columns: minmax(0, 1fr); }
  .sd-school-profile .school-photo-grid img { max-height: 420px; aspect-ratio: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sd-school-profile *,
  #school-photo-dialog * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
