:root {
  --plum: #6e386a;
  --plum-dark: #4a2148;
  --plum-mid: #8b4a86;
  --gold: #d4a017;
  --gold-soft: #f3de8a;
  --ink: #24131f;
  --muted: #6a5564;
  --paper: #fbf7f4;
  --card: #ffffff;
  --line: #eadfe6;
  --ok: #1f7a4d;
  --err: #b42318;
  --warn: #9a6700;
  --shadow: 0 18px 40px rgba(74, 33, 72, 0.08);
  --radius: 18px;
  --font: "Outfit", "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--plum); text-decoration: none; }
a:hover { color: var(--plum-dark); }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--plum); font-weight: 700; letter-spacing: .08em; }
.brand img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; background: #fff; }
.nav-drop { position: relative; }
.nav-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; z-index: 30;
}
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: grid; }
.nav-menu a { display: block; padding: 8px 10px; border-radius: 8px; }
.nav-menu a:hover { background: #f7eef5; }
.brand span { font-size: 1.15rem; }
.site-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-size: .95rem; font-weight: 500; }
.site-nav a.is-active { color: var(--plum); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 999px; padding: 11px 20px; border: 0;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-primary { background: var(--plum); color: #fff !important; }
.btn-primary:hover { background: var(--plum-dark); color: #fff !important; }
.btn-gold { background: var(--gold); color: #2b1a12 !important; }
.btn-outline { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.btn-ghost { background: #fff; color: var(--plum); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.hero {
  position: relative; min-height: 72vh;
  background: #1a0f18;
  display: grid; align-items: end;
  color: #fff;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(26,10,24,.22) 0%, rgba(26,10,24,.45) 42%, rgba(26,10,24,.78) 78%);
}
.hero-copy { position: relative; z-index: 2; padding: 72px 0 64px; max-width: 760px; }
.kicker { color: var(--gold-soft); letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; font-weight: 700; }
.hero h1, .page-hero h1, .section h2, .portal-top h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.02em;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); line-height: 1.08; margin: 10px 0 14px; }
.hero p.lead { font-size: 1.12rem; color: #f4e9ef; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.page-hero {
  background: linear-gradient(135deg, var(--plum-dark), var(--plum-mid));
  color: #fff; padding: 54px 0 42px;
}
.page-hero.has-photo {
  position: relative;
  background-color: #1a0f18;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 254px;
}
.page-hero.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(36, 16, 34, .84) 0%, rgba(74, 33, 72, .58) 52%, rgba(26, 15, 24, .28) 100%);
}
.page-hero.has-photo .container { position: relative; z-index: 1; }
.page-hero p { color: #f3dcec; max-width: 640px; }

.section { padding: 72px 0; }
.section.alt { background: #fff; }
.section-head { margin-bottom: 28px; }
.section-head span { color: var(--plum); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .76rem; }
.section-head h2 { margin: 6px 0 0; font-size: 2.1rem; }

.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start; }
.grid-3, .cards, .school-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.facts { display: grid; gap: 14px; }
.facts li { list-style: none; }
.facts { padding: 0; margin: 0; }
.card, .facts li, .stat, .form-card, .table-wrap, .notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { overflow: hidden; }
.card img { height: 180px; width: 100%; object-fit: cover; }
.card-body, .facts li { padding: 18px 18px 20px; }
.facts li { padding: 16px 18px; }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.muted { color: var(--muted); }
.badge {
  display: inline-block; border-radius: 999px; padding: 3px 10px;
  font-size: .75rem; font-weight: 700; background: #f4e8f2; color: var(--plum);
}
.badge.ok { background: #e4f6ec; color: var(--ok); }
.badge.warn { background: #fff4d6; color: var(--warn); }
.badge.err { background: #fde8e6; color: var(--err); }
.badge.gold { background: #fff1c4; color: #7a5b00; }
.notice-toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  max-width: min(360px, calc(100vw - 36px));
  background: var(--plum-dark); color: #fff; border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 12px 30px rgba(40, 16, 36, .28);
}
.notice-toast strong { display: block; margin-bottom: 4px; }

.coming-more { margin-top: 16px; }

.section.impact { background: linear-gradient(180deg, #fff 0%, #fbf7f4 100%); }
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.impact-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 26px 30px;
  box-shadow: 0 16px 36px rgba(74, 33, 72, 0.06);
  overflow: hidden;
}
.impact-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 56, 106, .16), transparent 68%);
  pointer-events: none;
}
.impact-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: linear-gradient(160deg, #f7eaf4, #fff);
  color: var(--plum);
  box-shadow: inset 0 0 0 1px rgba(110, 56, 106, .08);
}
.impact-icon svg { width: 26px; height: 26px; }
.impact-card h3 { margin: 0 0 8px; font-size: 1.28rem; position: relative; }
.impact-card p { margin: 0; color: var(--muted); position: relative; }
.impact-card:nth-child(2) .impact-icon {
  background: linear-gradient(160deg, #f3e4f6, #fff);
  color: var(--plum-mid);
  box-shadow: inset 0 0 0 1px rgba(139, 74, 134, .16);
}
.impact-card:nth-child(3) .impact-icon {
  background: linear-gradient(160deg, #efe4f2, #fff);
  color: var(--plum-dark);
}

.team { display: flex; gap: 22px; align-items: center; background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.founder { align-items: flex-start; }
.founder img { width: 220px; height: 280px; object-fit: cover; object-position: top center; border-radius: 16px; flex: none; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--plum), var(--gold));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.4rem;
}

.site-footer { background: #1c1019; color: #eadceb; padding: 48px 0 18px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .9fr .8fr; gap: 28px; }
.site-footer a, .site-footer h4 { color: #fff; display: block; margin: 6px 0; }
.site-footer p { color: #d7c4d3; }
.footer-brand { margin-bottom: 12px; }
.copyright { border-top: 1px solid #3a2436; margin-top: 28px; padding-top: 14px; color: #b498ad; font-size: .88rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.copyright a { display: inline; color: #f3d48a; text-decoration: underline; }
.copyright span { flex-shrink: 0; }
.copyright span:last-child { margin-left: auto; }

.flash-wrap { margin-top: 16px; }
.flash { padding: 12px 14px; border-radius: 12px; margin: 10px 0 16px; }
.flash-ok { background: #e7f6ee; color: #145c38; }
.flash-err { background: #fde8e6; color: #8a1f16; }

label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: .92rem; }
label.choice { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.choice input { width: auto; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 12px;
  border: 1px solid #d9c8d4; background: #fff; font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
.form-card { padding: 24px; max-width: 720px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help { font-size: .84rem; color: var(--muted); margin-top: 4px; }

.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-art {
  background: linear-gradient(160deg, rgba(74,33,72,.7), rgba(26,10,24,.85)), url("../img/hero.jpg") center/cover;
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: end;
}
.auth-form { padding: 48px; display: flex; align-items: center; }
.auth-form .inner { width: min(460px, 100%); }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .93rem; }
th { background: #f7eef5; color: var(--plum-dark); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }

.portal-body { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: #f6f1f4; }
.sidebar { background: var(--plum-dark); color: #f7e9f3; padding: 22px 16px; }
.sidebar .brand { color: #fff; margin-bottom: 8px; }
.sidebar-role { color: var(--gold-soft); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 4px; margin-top: 22px; }
.sidebar a { color: #f3dceb; padding: 10px 12px; border-radius: 10px; }
.sidebar a.is-active, .sidebar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.portal-main { padding: 28px; }
.portal-mobile-nav { display: none; }
.portal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.portal-top h1 { margin: 0 0 16px; font-size: 1.8rem; }
.who { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px 0 22px; }
.stat { padding: 16px; }
.stat b { display: block; font-size: 1.5rem; color: var(--plum); }
.letter {
  width: min(800px, 100%); margin: 0 auto; background: #fff; padding: 40px;
  border: 8px solid var(--plum); position: relative;
}
.letter .crest { width: 90px; margin: 0 auto 8px; }
.letter h2 { text-align: center; font-family: var(--serif); color: var(--plum); margin: 0; }
.watermark { position: absolute; inset: 40px; opacity: .06; display: grid; place-items: center; pointer-events: none; }
.watermark img { width: 280px; }
.pay-box { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 14px; border: 1px dashed var(--plum-mid); border-radius: 14px; margin: 10px 0; background: #fff; }
.pay-box > div:first-child { flex: 1 1 14rem; min-width: 0; }
.pay-box > div:last-child { flex: 0 0 auto; }
.pay-instructions { margin: 18px 0; padding: 16px 18px; border-radius: 14px; background: #fff8ee; border: 1px solid #ead7b0; }
.pay-instructions h3 { margin-top: 0; }
.pay-instructions ol { margin: 8px 0 0; padding-left: 18px; }
.pay-number { font-size: 1.7rem; font-weight: 700; letter-spacing: .04em; color: var(--plum); margin: 6px 0; }

.id-layout { display: grid; grid-template-columns: 280px minmax(520px, 1fr) 240px; gap: 18px; align-items: start; }
.id-profile, .id-card, .id-package { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.id-profile { padding: 22px 18px; text-align: center; }
.id-photo {
  width: 180px; height: 180px; object-fit: cover; border-radius: 50%;
  margin: 0 auto 12px; border: 4px solid #f3e4f0;
}
.id-profile h2 { margin: 0 0 8px; color: var(--plum); font-size: 1.35rem; }
.id-chip { display: inline-block; background: #1f7a4d; color: #fff; border-radius: 4px; padding: 4px 8px; font-size: .8rem; font-weight: 700; }
.id-facts { text-align: left; margin-top: 16px; display: grid; gap: 8px; font-size: .92rem; }
.id-facts div { display: grid; grid-template-columns: 108px 1fr; gap: 10px; align-items: start; }
.id-facts strong { text-align: right; }
.id-facts span { color: var(--muted); }
.id-parent { text-align: left; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .92rem; }
.id-card { position: relative; overflow: visible; width: 100%; }
.id-lines strong { overflow-wrap: anywhere; }
.search-bar { display: flex; gap: 8px; margin: 0 0 16px; max-width: 520px; }
.search-bar input { margin: 0; }
.id-card .watermark { opacity: .12; }
.id-card .watermark img { width: 220px; height: auto; }
.id-banner { background: #6e386a; color: #fff; text-align: center; padding: 12px; letter-spacing: .04em; font-size: .95rem; }
.id-body { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 16px; position: relative; z-index: 1; }
.id-body img { width: 120px; height: 140px; object-fit: cover; border-radius: 8px; }
.id-lines { display: grid; grid-template-columns: 90px 1fr; gap: 4px 8px; font-size: .92rem; }
.id-lines span { color: var(--muted); }
.id-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.id-foot strong { color: var(--plum); }
.id-foot img { height: 42px; width: auto; }
.id-actions { display: grid; gap: 10px; margin-top: 12px; }
.btn-block { width: 100%; border-radius: 8px; }
.btn-blue { background: #1565c0; color: #fff !important; }
.btn-yellow { background: #f5c400; color: #1a1a1a !important; }
.id-package { padding: 18px; text-align: center; }
.id-package h3 { margin: 0; }
.id-package .pct { font-size: 2rem; color: var(--plum); margin: 8px 0; }
.student-tile img { height: 220px; object-fit: cover; }
.thumb { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }

.adm-sheet { width: min(210mm, 100%); margin: 0 auto; background: #fff; color: #1a1a1a; padding: 18mm 16mm 20mm; position: relative; overflow: hidden; }
.adm-sheet h2 { font-family: "Playfair Display", Georgia, serif; text-align: center; color: #1d3557; margin: 6px 0; }
.adm-logo { width: 92px; height: 92px; object-fit: cover; border-radius: 50%; margin: 0 auto 8px; }
.adm-contact { text-align: center; color: #444; font-size: .92rem; margin: 0; }
.adm-title { text-align: center; text-transform: uppercase; letter-spacing: .04em; color: #1d3557; border-bottom: 2px solid #1d3557; padding-bottom: 6px; margin: 16px 0; }
.adm-ref { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.adm-h { font-weight: 700; color: #1d3557; border-left: 4px solid #a736a7; padding-left: 10px; margin: 18px 0 8px; }
.adm-sheet table { width: 100%; }
.adm-sheet td { border: 0; padding: 3px 0; }
.adm-sheet td.k { width: 42%; color: #444; font-weight: 600; }
.adm-note { background: #f8f3ff; border-left: 4px solid #a736a7; padding: 10px 12px; color: #3c0052; }
.adm-sign { display: flex; justify-content: flex-end; margin-top: 18px; }
.adm-sign img { width: 160px; height: 70px; object-fit: contain; margin: 0 auto; }
.adm-sign figcaption { text-align: center; }
.sig-line { width: 180px; height: 2px; background: #1d3557; margin: 4px auto 6px; }
.adm-stamp {
  position: absolute; top: 148mm; right: 18mm; width: 150px; height: 150px; border-radius: 50%;
  border: 4px solid #a736a7; color: #a736a7; display: grid; place-items: center; text-align: center;
  transform: rotate(-12deg); background: rgba(167,54,167,.05); font-weight: 800; line-height: 1.15;
}
.adm-stamp b { font-family: Georgia, serif; font-size: 1.4rem; }
.adm-stamp.is-pending { border-color: #b8860b; color: #8a6508; background: rgba(184, 134, 11, .08); }
.adm-stamp.is-expired,
.adm-stamp.is-declined { border-color: #8a6a78; color: #6d4d5a; background: rgba(80, 40, 60, .05); }
.adm-foot { margin-top: 28px; border-top: 1px solid #ddd; text-align: center; color: #666; font-size: .85rem; padding-top: 8px; }
.page-break { break-before: page; }

@media (max-width: 960px) {
  .grid-2, .grid-3, .cards, .school-grid, .impact-grid, .footer-grid, .auth-shell, .portal-body, .form-row, .stats {
    grid-template-columns: 1fr;
  }
  .nav-toggle { display: block; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 74px; left: 0; right: 0; background: #fff; padding: 16px; border-bottom: 1px solid var(--line); }
  .site-nav.open .nav-menu { position: static; display: grid; box-shadow: none; border: 0; }
  .id-layout, .id-body, .adm-ref { grid-template-columns: 1fr; display: grid; }
  .adm-stamp { position: static; margin: 16px auto; }
  .hero { min-height: 68vh; }
  .founder { flex-direction: column; }
  .founder img { width: min(220px, 100%); }
  .sidebar { display: none; }
  .portal-body { grid-template-columns: 1fr; }
  .portal-mobile-nav {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
  }
  .portal-mobile-nav a {
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 12px; font-size: .85rem; color: var(--plum);
  }
  .portal-mobile-nav a.is-active { background: var(--plum); color: #fff; }
}

@media print {
  .site-header, .site-footer, .sidebar, .portal-top, .portal-mobile-nav, .btn, .flash, .id-actions, .notice-toast { display: none !important; }
  .portal-body, .portal-main { display: block; background: #fff; padding: 0; }
  .letter { border-width: 6px; }
  .adm-sheet { width: 100%; margin: 0; box-shadow: none; }
}
