:root {
  --navy: #1d3a6e;
  --navy-deep: #13284d;
  --gold: #c99a2e;
  --gold-soft: #f6ecd3;
  --ink: #1f2430;
  --muted: #5d6576;
  --line: #e2e5ec;
  --bg: #ffffff;
  --bg-alt: #f6f7fa;
  --red: #b42318;
  --green: #18794e;
  --radius: 10px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--navy-deep); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 1.2rem 0 .4rem; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Top bar */
.topbar { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy-deep); }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--serif); font-size: 1.1rem; }
.brand small { font-size: .78rem; color: var(--muted); }
.mainnav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.mainnav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.mainnav a:hover { color: var(--gold); }

.alert-bar { background: var(--red); color: #fff; padding: .55rem 0; font-size: .95rem; }
.alert-bar a { color: #fff; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy-deep), var(--navy)); color: #fff; padding: clamp(3rem, 8vw, 6rem) 0; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 40px solid rgba(201, 154, 46, .18); }
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin-left: max(16px, (100% - 1120px) / 2); }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin: .3rem 0 1rem; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: .85rem; margin: 0; }
.lead { font-size: 1.2rem; opacity: .92; margin: 0 0 1.8rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

.btn { display: inline-block; padding: .7rem 1.3rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; }
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover { background: #ddb04a; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.hero .btn-ghost { color: #fff; }

.quicklinks { background: var(--gold-soft); border-bottom: 1px solid var(--line); }
.quicklinks-inner { display: flex; gap: .5rem 1.6rem; flex-wrap: wrap; padding: .75rem 0; }
.quicklinks a { font-weight: 600; text-decoration: none; color: var(--navy-deep); font-size: .95rem; }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.section-head h1, .section-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; }
.empty { color: var(--muted); padding: 2rem; background: var(--bg-alt); border-radius: var(--radius); text-align: center; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .3rem 0 1rem; }

/* Announcement cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s; }
.card:hover { box-shadow: 0 8px 24px rgba(19, 40, 77, .1); }
.card.pinned { border-top: 4px solid var(--gold); }
.card.urgent { border-top: 4px solid var(--red); }
.card-img img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.2rem 1.3rem; }
.card h3 { margin: .3rem 0 .4rem; font-size: 1.2rem; }
.card h3 a { text-decoration: none; color: var(--navy-deep); }
.card h3 a:hover { text-decoration: underline; }
.excerpt { color: var(--muted); margin: 0; font-size: .97rem; }
.attach-note { font-size: .85rem; font-weight: 600; color: var(--navy); margin: .6rem 0 0; }
.meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 0; }
.tag { padding: .1rem .55rem; border-radius: 999px; background: #e8edf7; color: var(--navy); font-weight: 600; font-size: .78rem; }
.tag-urgent { background: #fde8e6; color: var(--red); }
.tag-event { background: #e6f4ec; color: var(--green); }
.tag-enrollment { background: var(--gold-soft); color: #7a5a10; }
.pin { font-weight: 600; color: #7a5a10; font-size: .8rem; }

.filters, .pager { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.filters a, .pager a { padding: .3rem .9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .92rem; }
.filters a.active, .pager a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager { margin-top: 2rem; }

.crumbs a { text-decoration: none; font-weight: 600; }
.hero-img { border-radius: var(--radius); margin: 1rem 0 1.5rem; width: 100%; }
.prose { font-size: 1.07rem; overflow-wrap: anywhere; }

/* About, programs, admissions, contact */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; }
.about-grid h3:first-child { margin-top: 0; }
.vision { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 1.6rem; }
.vision h3 { color: var(--gold); margin-top: 0; }
.vision p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; margin: 0; }
.mission { padding-left: 1.6rem; display: grid; gap: .55rem; }
.mission li::marker { font-weight: 700; color: var(--gold); }
.philosophy { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; }
.philosophy h3 { margin-top: 0; }
.philosophy p { margin: 0; font-style: italic; }
.pillar { list-style: none; padding: 0; display: grid; gap: .5rem; }
.pillar li { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: 8px; padding: .55rem .9rem; border: 1px solid var(--line); }
.pillar .letter { flex: none; width: 2.3rem; height: 2.3rem; border-radius: 8px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; }
.program-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1.5rem; margin-top: 1.2rem; }
.program-level { display: flex; flex-direction: column; }
.program-level.full { grid-column: 1 / -1; }
.level-title { display: flex; align-items: center; gap: .8rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-family: var(--sans); font-weight: 700; margin: 0 0 .8rem; }
.level-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.programs { display: grid; grid-template-columns: 1fr; gap: .6rem; flex: 1; grid-auto-rows: 1fr; }
.program-level.full .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
.program { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: .8rem 1.1rem; background: #fff; }
.program h4 { font-family: var(--serif); color: var(--navy-deep); font-size: 1.1rem; margin: 0; line-height: 1.3; }
.subs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.subs li { background: #e8edf7; color: var(--navy); border-radius: 999px; padding: .12rem .65rem; font-size: .85rem; font-weight: 600; }
.subs-list { flex-basis: 100%; margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.subs-list li::marker { color: var(--gold); }
@media (max-width: 760px) {
  .program-levels, .program-level.full .programs { grid-template-columns: 1fr; }
  .programs { grid-auto-rows: auto; }
}
.tagline { font-family: var(--serif); font-style: italic; font-size: 1.45rem; color: #fff; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: .8rem; max-width: 760px; }
.steps li { counter-increment: s; position: relative; padding: .8rem 1rem .8rem 3.4rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 1rem; top: .75rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.contact dt { font-weight: 600; color: var(--navy-deep); margin-top: .7rem; }
.contact dd { margin: 0; }
.map { width: 100%; min-height: 320px; border: 0; border-radius: var(--radius); }

.footer { background: var(--navy-deep); color: #cfd6e4; padding: 2.2rem 0; font-size: .92rem; }
.footer a { color: #fff; }
.footer strong { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.footer p { margin: .2rem 0; }

/* Admin */
.admin { background: var(--bg-alt); }
.admin-bar { background: var(--navy-deep); color: #fff; }
.admin-bar-inner { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; gap: 1rem; flex-wrap: wrap; }
.admin-bar .brand { color: #fff; }
.admin-user { display: flex; gap: 1rem; align-items: center; font-size: .92rem; }
.admin-user a, .admin-user .link-btn { color: #fff; }
.admin-user form { margin: 0; }
.admin-main { padding: 2rem 0 4rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--red); }
.notice { background: #e6f4ec; color: var(--green); padding: .7rem 1rem; border-radius: 8px; font-weight: 600; }
.error { background: #fde8e6; color: var(--red); padding: .7rem 1rem; border-radius: 8px; }
.error p { margin: .2rem 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin-table th, .admin-table td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.row-actions { display: flex; gap: .9rem; white-space: nowrap; }
.row-actions form { margin: 0; }
.status { padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status-live { background: #e6f4ec; color: var(--green); }
.status-draft { background: #eceef2; color: var(--muted); }
.status-scheduled { background: #e8edf7; color: var(--navy); }
.status-expired { background: #fde8e6; color: var(--red); }

.edit-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1.1rem; max-width: 820px; }
.edit-form label, .login-box label { display: grid; gap: .3rem; font-weight: 600; }
.edit-form input:not([type=checkbox]), .edit-form select, .edit-form textarea, .login-box input {
  font: inherit; font-weight: 400; padding: .55rem .7rem; border: 1px solid #c9ceda; border-radius: 8px; width: 100%; background: #fff;
}
.edit-form textarea { resize: vertical; }
.edit-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.edit-form .row label { align-content: start; }
.edit-form .check { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.edit-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; display: grid; gap: .6rem; }
.edit-form legend { font-weight: 600; padding: 0 .3rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.thumb { max-width: 240px; border-radius: 8px; }
.form-actions { display: flex; gap: .8rem; }

.login-page { display: grid; place-items: center; min-height: 100vh; }
.login-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem; width: min(380px, 100% - 32px); display: grid; gap: 1rem; text-align: left; }
.login-box h1 { margin: 0; font-size: 1.6rem; }
.login-box form { display: grid; gap: 1rem; }

@media (max-width: 760px) {
  .topbar { position: static; }
  .about-grid, .contact-grid, .edit-form .row { grid-template-columns: 1fr; }
  .mainnav { gap: .8rem; font-size: .9rem; }
  .brand small { display: none; }
}

.form-title { font-size: 1.25rem; margin: 0 0 .2rem; }
.btn-sm { padding: .35rem .9rem; font-size: .9rem; }
.inline-form { display: flex; gap: .5rem; margin-top: .5rem; }
.inline-form input { font: inherit; padding: .35rem .6rem; border: 1px solid #c9ceda; border-radius: 8px; }
details.reset summary { cursor: pointer; color: var(--navy); font-size: .9rem; margin-top: .3rem; }
.checks { list-style: none; padding: 0; display: grid; gap: .4rem; }
.checks li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .8rem; }
.checks li span { font-weight: 700; }
.checks li.ok span { color: var(--green); }
.checks li.bad { border-color: #f3b8b2; }
.checks li.bad span { color: var(--red); }
.admin-main.narrow { max-width: 820px; }
.spaced { margin-top: 2.2rem; }
h2.form-title.spaced { margin-bottom: .8rem; }

/* Logo: keeps any shape of image inside its box */
img.logo { object-fit: contain; }

/* Optional hero photo: put hero.jpg / hero.webp / hero.png in this assets folder */
.hero.has-photo { background-size: cover; background-position: center 62%; min-height: 520px; display: flex; align-items: center; }
.hero.has-photo .hero-inner { text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero.has-photo::after { display: none; }
.hero.hero-jpg { background-image: linear-gradient(100deg, rgba(19,40,77,.9) 0%, rgba(19,40,77,.72) 40%, rgba(19,40,77,.15) 75%, rgba(19,40,77,0)), url("hero.jpg"); }
.hero.hero-webp { background-image: linear-gradient(100deg, rgba(19,40,77,.9) 0%, rgba(19,40,77,.72) 40%, rgba(19,40,77,.15) 75%, rgba(19,40,77,0)), url("hero.webp"); }
.hero.hero-png { background-image: linear-gradient(100deg, rgba(19,40,77,.9) 0%, rgba(19,40,77,.72) 40%, rgba(19,40,77,.15) 75%, rgba(19,40,77,0)), url("hero.png"); }
@media (max-width: 760px) {
  .hero.has-photo { min-height: 0; }
  .hero.hero-jpg { background-image: linear-gradient(rgba(19,40,77,.78), rgba(19,40,77,.78)), url("hero.jpg"); }
  .hero.hero-webp { background-image: linear-gradient(rgba(19,40,77,.78), rgba(19,40,77,.78)), url("hero.webp"); }
  .hero.hero-png { background-image: linear-gradient(rgba(19,40,77,.78), rgba(19,40,77,.78)), url("hero.png"); }
}
