:root,
[data-theme="apdssmp"] {
  color-scheme: light;
  --color-primary: #04733a;
  --color-primary-content: #ffffff;
  --color-secondary: #f4c430;
  --color-secondary-content: #17220f;
  --color-accent: #1d7c9f;
  --color-accent-content: #ffffff;
  --color-neutral: #173427;
  --color-neutral-content: #f8fbf5;
  --color-base-100: #ffffff;
  --color-base-200: #f2f7ee;
  --color-base-300: #dce8d3;
  --color-base-content: #17220f;
  --brand-green: #04733a;
  --brand-green-dark: #034f2a;
  --brand-green-soft: #ecf7ea;
  --brand-yellow: #f4c430;
  --brand-yellow-soft: #fff6c8;
  --ink: #17220f;
  --muted: #65705f;
  --line: #dbe5d5;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(14, 56, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(244, 196, 48, 0.18), transparent 28rem),
    linear-gradient(180deg, #fbfdf8 0%, #eef6eb 100%);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  min-height: 64vh;
}

.loader-panel,
.noscript-warning {
  width: min(1120px, calc(100% - 2rem));
  margin: 4rem auto;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(4, 115, 58, 0.14);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.top-strip {
  background: var(--brand-green-dark);
  color: white;
  font-size: 0.82rem;
}

.top-strip-inner {
  width: min(1180px, calc(100% - 2rem));
  min-height: 2rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-contact,
.footer-contact p {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.top-contact svg,
.footer-contact svg,
.navbar-actions svg,
.nav-toggle svg,
.lms-link svg,
.contact-line svg {
  width: 1rem;
  height: 1rem;
}

.site-navbar {
  width: min(1180px, calc(100% - 2rem));
  min-height: 4.75rem;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.navbar-brand-block,
.brand-link,
.desktop-nav,
.navbar-actions {
  display: flex;
  align-items: center;
}

.navbar-brand-block {
  min-width: 0;
  gap: 0.6rem;
}

.brand-link {
  min-width: 0;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  width: 3.35rem;
  height: 3.35rem;
  object-fit: contain;
}

.brand-text {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
  line-height: 1.12;
}

.brand-short {
  color: var(--brand-green-dark);
  font-size: 1.15rem;
  font-weight: 800;
}

.brand-full {
  max-width: 26rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.desktop-nav {
  flex: 1;
  justify-content: center;
  gap: 0.2rem;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  border-radius: 0.45rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.desktop-nav a {
  padding: 0.58rem 0.78rem;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
  background: var(--brand-yellow-soft);
  color: var(--brand-green-dark);
}

.navbar-actions .btn {
  gap: 0.42rem;
}

.nav-toggle {
  display: none;
  min-width: 2.65rem;
}

.mobile-panel {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 0.8rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: white;
  box-shadow: var(--shadow);
}

.mobile-panel a {
  display: block;
  padding: 0.75rem 0.9rem;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
}

.markdown-body {
  line-height: 1.72;
}

.markdown-body > h1,
.markdown-body > h2,
.markdown-body > h3 {
  color: var(--brand-green-dark);
  line-height: 1.15;
}

.markdown-body > h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0;
}

.markdown-body > h2 {
  margin: 2.2rem 0 0.75rem;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.markdown-body > p,
.markdown-fragment p {
  color: #394438;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.3rem;
}

.markdown-body li + li {
  margin-top: 0.35rem;
}

.hero-school {
  position: relative;
  overflow: hidden;
  min-height: 30rem;
  margin-bottom: 2rem;
  padding: clamp(2.2rem, 6vw, 5rem);
  border-radius: 0.5rem;
  background:
    linear-gradient(100deg, rgba(3, 79, 42, 0.96) 0%, rgba(4, 115, 58, 0.86) 47%, rgba(244, 196, 48, 0.46) 100%),
    url("../gallery/school-campus.jpg") center / cover no-repeat;
  color: white;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.65fr);
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow);
}

.hero-school h1 {
  max-width: 13ch;
  margin: 0;
  color: white;
  font-size: clamp(2.25rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-school p {
  max-width: 44rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--brand-yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.hero-crest-wrap {
  justify-self: center;
  width: min(18rem, 70vw);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.hero-crest-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22));
}

.intro-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  margin: 2rem 0;
}

.school-card,
.news-card,
.gallery-tile,
.source-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.school-card {
  padding: clamp(1rem, 2.4vw, 1.45rem);
}

.school-card h2,
.school-card h3,
.news-card h2,
.news-card h3 {
  margin: 0 0 0.6rem;
  color: var(--brand-green-dark);
  line-height: 1.2;
}

.school-card p:last-child,
.news-card p:last-child {
  margin-bottom: 0;
}

.school-card.highlight {
  background: linear-gradient(135deg, var(--brand-yellow-soft), #ffffff 58%);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0 2rem;
}

.stat-item {
  min-height: 8rem;
  padding: 1rem;
  border-left: 0.35rem solid var(--brand-yellow);
}

.stat-value {
  display: block;
  color: var(--brand-green-dark);
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  font-weight: 800;
  line-height: 1;
  overflow-wrap: anywhere;
}

.stat-label {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.25rem 0 1rem;
}

.section-heading h2 {
  margin: 0;
  color: var(--brand-green-dark);
}

.section-heading a {
  color: var(--brand-green-dark);
  font-weight: 800;
  text-decoration: none;
}

.news-grid,
.about-stack,
.program-grid,
.contact-grid,
.lms-grid {
  display: grid;
  gap: 1rem;
}

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

.news-list-page,
.about-stack {
  grid-template-columns: 1fr;
}

.news-card {
  padding: 1.2rem;
}

.news-date,
.badge-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-yellow-soft);
  color: var(--brand-green-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.program-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.program-card {
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1rem;
  border-radius: 0.5rem;
  background: var(--brand-green-dark);
  color: white;
  position: relative;
}

.program-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.program-card div {
  position: relative;
  z-index: 1;
}

.program-card h3,
.program-card p {
  color: white;
}

.program-card h3 {
  margin: 0 0 0.3rem;
}

.program-card p {
  margin: 0;
  font-size: 0.92rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-tile {
  overflow: hidden;
}

.gallery-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--brand-green-soft);
}

.gallery-tile figcaption {
  padding: 0.9rem 1rem 1rem;
}

.gallery-tile h3 {
  margin: 0 0 0.25rem;
  color: var(--brand-green-dark);
  font-size: 1rem;
}

.gallery-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.lms-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.lms-link {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  text-decoration: none;
}

.lms-link img {
  width: 5rem;
  height: 4rem;
  object-fit: contain;
}

.lms-link h3 {
  margin: 0 0 0.25rem;
  color: var(--brand-green-dark);
}

.lms-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
  margin-top: 1rem;
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-line:last-child {
  border-bottom: 0;
}

.contact-line svg {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  color: var(--brand-green);
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.source-panel {
  margin-top: 1rem;
  padding: 1rem;
}

.source-panel summary {
  cursor: pointer;
  color: var(--brand-green-dark);
  font-weight: 800;
}

.source-panel pre {
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  color: #344035;
  font-family: inherit;
  font-size: 0.9rem;
}

.empty-state {
  padding: 1.2rem;
  border: 1px dashed var(--line);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

.site-footer {
  background: #092b19;
  color: rgba(255, 255, 255, 0.86);
}

.footer-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.4rem 0;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-brand img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
}

.footer-brand h2 {
  margin: 0;
  color: white;
}

.footer-brand p,
.footer-contact p {
  margin: 0.2rem 0;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  width: fit-content;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--brand-yellow);
}

.footer-contact {
  display: grid;
  gap: 0.45rem;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.footer-bottom {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.83rem;
}

@media (max-width: 980px) {
  .desktop-nav,
  .navbar-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-navbar {
    min-height: 4.3rem;
  }

  .brand-full {
    max-width: 18rem;
  }

  .hero-school,
  .intro-band,
  .contact-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-school {
    min-height: auto;
  }

  .hero-crest-wrap {
    justify-self: start;
    width: 13rem;
  }

  .stat-grid,
  .news-grid,
  .program-grid,
  .gallery-grid,
  .lms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .top-contact {
    display: none;
  }

  .site-navbar,
  .top-strip-inner,
  .page-shell,
  .mobile-panel,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 1rem, 1180px);
  }

  .brand-logo {
    width: 2.8rem;
    height: 2.8rem;
  }

  .brand-full {
    display: none;
  }

  .page-shell {
    padding-top: 1rem;
  }

  .hero-school {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding: 2rem 1.1rem;
  }

  .hero-actions,
  .quick-actions,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn,
  .quick-actions .btn {
    width: 100%;
  }

  .stat-grid,
  .news-grid,
  .program-grid,
  .gallery-grid,
  .lms-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lms-link {
    grid-template-columns: 4.2rem minmax(0, 1fr);
  }

  .lms-link svg {
    display: none;
  }
}
