/* ==========================================================================
   Discovery School of Mesquite — Site Styles
   Pure CSS, no frameworks. Mobile-first, responsive.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --purple: #953CA1;
  --purple-dark: #7C3187;
  --purple-deep: #5E2566;
  --purple-50: #F8F0FA;
  --purple-100: #F1E3F4;
  --yellow: #FFD102;
  --yellow-dark: #EFC400;
  --slate: #485980;
  --slate-dark: #3A4966;
  --coral: #EB7051;
  --blue: #4E8CF3;
  --gold: #D3B015;
  --green: #4CAF50;
  --ink: #2E2A2E;
  --text: #585458;
  --muted: #8A848A;
  --bg: #FFFFFF;
  --bg-soft: #F4F5FA;
  --white: #FFFFFF;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(46, 42, 46, .08);
  --shadow-md: 0 8px 24px rgba(46, 42, 46, .12);
  --shadow-lg: 0 16px 48px rgba(46, 42, 46, .16);
  --font-head: 'Nunito', 'Trebuchet MS', sans-serif;
  --font-body: 'Poppins', 'Segoe UI', Helvetica, Arial, sans-serif;
  --header-h: 88px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
figure, blockquote { margin: 0; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
p  { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--yellow); color: var(--purple-deep); }

.container { width: min(1180px, 92%); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--soft { background: var(--bg-soft); }
.section--purple { background: var(--purple-50); }

.section-head { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head .eyebrow::before { content: "\2726 "; opacity: .7; }
.section-head .eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-100);
  border-radius: 999px;
  padding: .35em 1.1em;
  margin-bottom: 1em;
}
.section-head p { color: var(--text); }

/* crayon squiggle accent under headings (was a straight bar) */
.accent-bar {
  display: block;
  width: 110px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 14'%3E%3Cpath d='M4 9 Q 22 2 42 8 T 82 8 T 122 8 T 162 8 T 216 7' fill='none' stroke='%23FFD102' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  margin: 16px 0;
}
.section-head .accent-bar { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.4; /* normalize <a> vs <button> heights */
  padding: .85em 2em;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease, background .2s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--yellow { background: var(--yellow); color: var(--purple-deep); box-shadow: var(--shadow-sm); }
.btn--yellow:hover { background: var(--yellow-dark); color: var(--purple-deep); transform: translateY(-3px) scale(1.04) rotate(-.5deg); box-shadow: var(--shadow-md); }
.btn--purple { background: var(--purple); color: #fff; box-shadow: var(--shadow-sm); }
.btn--purple:hover { background: var(--purple-dark); color: #fff; transform: translateY(-3px) scale(1.04) rotate(.5deg); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn--ghost:hover { background: var(--purple-50); }
.btn--lg { font-size: 1.1rem; padding: 1em 2.4em; }
@media (max-width: 480px) { .btn--lg { font-size: 1rem; padding: 1em 1.6em; } }

/* ---------- Top bar ---------- */
.topbar { background: var(--purple); color: #fff; font-size: .9rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.topbar a { color: #fff; opacity: .95; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar__contact { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar__social { display: flex; gap: 8px; }
.topbar__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--purple);
}
.topbar__social svg { width: 16px; height: 16px; fill: currentColor; }
.topbar__social a:hover { background: var(--yellow); color: var(--purple-deep); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg-soft);
  box-shadow: 0 1px 0 rgba(46,42,46,.06);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 64px; width: auto; }
.brand:hover img { animation: wiggle .5s ease; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 36px); }
.site-nav a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--purple);
  position: relative;
  padding: 6px 0;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 3px; border-radius: 2px;
  background: var(--yellow);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
.site-nav a.btn { margin-left: 8px; padding: .65em 1.6em; font-size: 1rem; }
.site-nav a.btn::after { display: none; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block; width: 26px; height: 3px; border-radius: 2px;
  background: var(--purple);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-soft);
    box-shadow: var(--shadow-md);
    padding: 8px 5% 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid rgba(46,42,46,.08); }
  .site-nav a::after { display: none; }
  .site-nav a.btn { margin: 16px 0 0; border-bottom: 0; text-align: center; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  background: var(--slate);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 63% 10%;
}
.hero__inner { position: relative; z-index: 2; width: 100%; padding: clamp(48px, 8vw, 96px) 0; }
.hero__card {
  position: relative; /* anchors the star badge to the card's top-right corner */
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  background: rgba(72, 89, 128, .82);
  backdrop-filter: blur(2px);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  color: #fff;
}
.hero__card .accent-bar { margin-inline: auto; }
.hero__card h1 { color: #fff; margin-bottom: 0; }
.hero__card p { color: #F1F1F1; font-size: 1.06rem; margin: 18px 0 28px; }
/* Star-seal badge, anchored to the content container (not the viewport) so it
   keeps its top-right spot on any screen width */
.hero__badge {
  position: absolute; z-index: 3;
  /* star center sits on the card's rounded top-right corner */
  top: -96px; right: -96px;
  width: 192px; height: 192px;
  padding-bottom: 10px; /* optical centering: a 5-point star's visual center sits above its middle */
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-align: center;
  font-family: var(--font-head);
  filter: drop-shadow(0 8px 14px rgba(20, 30, 20, .35));
  animation: badge-float 5s ease-in-out infinite;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
/* the star shape lives on ::before, tilted clockwise like the Texas Rising Star logo,
   so the text on top stays level and centered */
.hero__badge::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--green);
  clip-path: polygon(50.0% 0.0%, 65.9% 28.2%, 97.6% 34.5%, 75.7% 58.3%, 79.4% 90.5%, 50.0% 77.0%, 20.6% 90.5%, 24.3% 58.3%, 2.4% 34.5%, 34.1% 28.2%);
  transform: rotate(18deg);
}
.hero__badge b { font-weight: 800; font-size: 1.8rem; line-height: 1; }
.hero__badge span {
  font-size: .62rem; font-weight: 800; line-height: 1.2;
  letter-spacing: .06em; text-transform: uppercase;
  max-width: 92px; opacity: .95;
}
.hero__badge:hover { color: #fff; transform: scale(1.1); animation-play-state: paused; }
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
/* tablet: less horizontal room beside the card — smaller star, pulled slightly inward */
@media (max-width: 980px) and (min-width: 701px) {
  .hero__badge { width: 160px; height: 160px; top: -84px; right: -44px; }
  .hero__badge b { font-size: 1.45rem; }
  .hero__badge span { font-size: .54rem; max-width: 80px; }
  .hero__card { margin-top: 48px; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
/* white wave at the bottom of hero sections, flowing into the page */
.hero::after, .page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px; z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cpath d='M0 18 Q 15 6 30 14 T 60 14 T 90 14 T 120 10 L120 26 L0 26 Z' fill='%23FFFFFF'/%3E%3C/svg%3E") repeat-x bottom / 240px 100%;
  pointer-events: none;
}
@media (max-width: 700px) {
  .hero__badge { width: 128px; height: 128px; top: -74px; right: -10px; padding-bottom: 6px; }
  .hero__badge b { font-size: 1.15rem; }
  .hero__badge span { font-size: .46rem; max-width: 64px; }
  /* room for the star: extra space above the card and clear padding under the corner */
  .hero__card { margin-top: 80px; padding-top: 56px; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  background: var(--slate);
  color: #fff;
  overflow: hidden;
}
.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-hero__inner { position: relative; z-index: 2; padding: clamp(64px, 10vw, 128px) 0; max-width: 780px; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #EDEFF5; font-size: 1.08rem; max-width: 640px; }
/* floating doodles on inner-page heroes */
.page-hero__inner::before {
  content: ""; position: absolute; top: 26px; right: -4%;
  width: 30px; height: 30px; background: var(--yellow); opacity: .9;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: floaty 8s ease-in-out infinite alternate;
}
.page-hero__inner::after {
  content: ""; position: absolute; bottom: 14px; right: 10%;
  width: 24px; height: 24px; border: 5px solid var(--coral); border-radius: 50%; opacity: .85;
  animation: floaty 10s ease-in-out infinite alternate;
}

/* ---------- Feature / value cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; } }

.value-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.value-card:hover { transform: translateY(-7px) rotate(-.6deg) scale(1.01); box-shadow: var(--shadow-md); }
.value-card, .curr-card, .post-card, .why-card, .highlight-card { transition-timing-function: cubic-bezier(.34, 1.56, .64, 1); transition-duration: .3s; }
.value-card__img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }
.value-card__body { padding: 24px 26px 28px; flex: 1; }
.value-card__body h3 { margin-bottom: .4em; }
.value-card__body p { margin: 0; font-size: .95rem; }
.value-card--coral { background: var(--coral); }
.value-card--blue { background: var(--blue); }
.value-card--gold { background: var(--gold); }
.value-card--coral .value-card__body h3, .value-card--blue .value-card__body h3, .value-card--gold .value-card__body h3 { color: #fff; }
.value-card--coral .value-card__body p, .value-card--blue .value-card__body p, .value-card--gold .value-card__body p { color: #F5F5F5; }

/* ---------- Split (text + image) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split__img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split--reverse > :first-child { order: 0; } }

/* ---------- Pillars (icon rows) ---------- */
.pillar { display: flex; gap: 16px; align-items: flex-start; }
.pillar__icon {
  flex: 0 0 56px; width: 56px; height: 56px;
  background: var(--purple-50);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.pillar__icon img { width: 100%; height: 100%; object-fit: contain; }
.pillar h3 { font-size: 1.08rem; margin-bottom: .2em; }
.pillar p { font-size: .92rem; margin: 0; }

/* ---------- Stats strip ---------- */
.stats {
  background: var(--purple); color: #fff;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 2px, transparent 2.5px);
  background-size: 34px 34px;
}
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 36px 24px; text-align: center; align-items: start;
  padding: clamp(40px, 6vw, 64px) 0;
}
@media (max-width: 1020px) { .stats__grid { grid-template-columns: repeat(2, 1fr); } }
.stat b {
  display: block;
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  line-height: 1.15;
  white-space: nowrap;
  color: var(--yellow);
  margin-bottom: 8px;
}
.stat span { display: block; font-size: .92rem; opacity: .85; letter-spacing: .02em; }

/* ---------- Testimonials ---------- */
.tslider { position: relative; max-width: 860px; margin: 0 auto; }
.tslider__track { overflow: hidden; border-radius: var(--radius-lg); }
.tslider__rail { display: flex; transition: transform .45s ease; }
.tcard {
  flex: 0 0 100%;
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  overflow: hidden;
}
.tcard::before {
  content: "\201C";
  position: absolute; top: -12px; left: 14px;
  font-family: Georgia, serif;
  font-size: 7rem; line-height: 1;
  color: var(--yellow); opacity: .5;
  pointer-events: none;
}
.tcard__stars { color: var(--yellow); font-size: 1.3rem; letter-spacing: .2em; margin-bottom: 14px; }
.tcard blockquote { margin: 0 0 20px; font-size: 1.05rem; color: var(--text); font-style: italic; }
.tcard figcaption b { display: block; font-family: var(--font-head); font-weight: 800; color: var(--purple); font-size: 1.1rem; }
.tcard figcaption span { font-size: .9rem; color: var(--muted); }
.tslider__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--yellow); color: var(--purple-deep);
  font-size: 1.3rem; font-weight: 700;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.tslider__nav:hover { background: var(--yellow-dark); }
.tslider__nav--prev { left: -14px; }
.tslider__nav--next { right: -14px; }
.tslider__dots { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.tslider__dots button {
  width: 12px; height: 12px; border-radius: 50%; border: 0; cursor: pointer;
  background: #D8CFDA; transition: background .2s ease, transform .2s ease;
  padding: 0;
}
.tslider__dots button.is-active { background: var(--purple); transform: scale(1.25); }

/* ---------- Cert strip ---------- */
.certs { text-align: center; }
.certs h2 { font-size: 1.3rem; color: var(--slate); }
.certs__logos { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; margin-top: 18px; }
.certs__logos img { height: 64px; width: auto; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid rgba(46,42,46,.1); border-radius: var(--radius); background: #fff; margin-bottom: 14px; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--slate);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--purple-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: var(--purple); line-height: 1;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .2s ease;
  flex: 0 0 auto;
}
.faq-item summary:hover::after { background: var(--yellow); color: var(--purple-deep); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--text); }

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(28px, 5vw, 48px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid--dates { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-grid--dates { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-head); font-weight: 700; color: var(--purple); font-size: 1rem; }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--purple-50);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .15s ease, background .15s ease;
  width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--purple); background: #fff;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #B79FBE; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.form-status { display: none; margin-top: 16px; padding: 14px 18px; border-radius: 12px; font-weight: 600; }
.form-status.is-ok { display: block; background: #E8F5E9; color: #256829; }
.form-status.is-err { display: block; background: #FDECEA; color: #A13232; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none !important; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1000px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid a {
  display: block; overflow: hidden; border-radius: 14px;
  aspect-ratio: 1 / 1; background: var(--purple-50);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.gallery-grid a:hover { transform: rotate(-1.2deg) scale(1.03); box-shadow: var(--shadow-md); position: relative; z-index: 2; }
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.gallery-grid a:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 16, 22, .93);
  display: none;
  align-items: center; justify-content: center;
  padding: 4vh 4vw;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox__btn {
  position: absolute; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__btn:hover { background: var(--purple); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; opacity: .8; }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-card img {
  width: 190px; height: 190px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 18px;
  border: 6px solid var(--purple-100);
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), border-color .25s ease;
}
.team-card:hover img { transform: scale(1.06) rotate(-3deg); border-color: var(--yellow); }
.team-card h3 { margin-bottom: .1em; }
.team-card .role {
  display: inline-block;
  font-family: var(--font-head); font-weight: 800; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--purple); background: var(--purple-100);
  padding: .25em 1em; border-radius: 999px; margin-bottom: 12px;
}
.team-card p { font-size: .92rem; }

/* ---------- Why cards (about) ---------- */
.why-card {
  background: #fff; border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--yellow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.why-card h3 { font-size: 1.05rem; color: var(--slate); }
.why-card p { font-size: .9rem; margin: 0; }
.why-card:nth-child(4n+2) { border-top-color: var(--coral); }
.why-card:nth-child(4n+3) { border-top-color: var(--blue); }
.why-card:nth-child(4n+4) { border-top-color: var(--purple); }

/* ---------- Programs ---------- */
.program-block { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 60px); align-items: center; padding: clamp(32px, 5vw, 56px) 0; }
@media (max-width: 860px) { .program-block { grid-template-columns: 1fr; } }
.program-block--flip > :first-child { order: 2; }
@media (max-width: 860px) { .program-block--flip > :first-child { order: 0; } }
.program-block img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.program-block .age-tag {
  display: inline-block;
  font-family: var(--font-head); font-weight: 800; font-size: .85rem;
  color: var(--purple-deep); background: var(--yellow);
  border-radius: 999px; padding: .3em 1.1em; margin-bottom: 14px;
}
.program-block ul { margin: 0; }
.program-block li { margin-bottom: .35em; }

.skill-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.skill-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.skill-card:hover img { transform: scale(1.06); }
.skill-card span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 32px 18px 14px;
  background: linear-gradient(transparent, rgba(30, 20, 34, .82));
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
}

.curr-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.curr-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.curr-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.curr-card__body { padding: 20px 22px 24px; }
.curr-card h3 { font-size: 1.05rem; color: var(--slate); }
.curr-card ul { margin: 0; padding-left: 1.1em; font-size: .9rem; }
.curr-card li { margin-bottom: .3em; }

/* Calendar slider */

/* ---------- Blog ---------- */
.post-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card__body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.post-card .meta, .value-card__body .meta { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.post-card h3 { font-size: 1.2rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--purple); }
.post-card p { font-size: .93rem; flex: 1; }
.post-card .readmore, .value-card__body .readmore { font-family: var(--font-head); font-weight: 800; color: var(--purple); }

.article { max-width: 760px; margin-inline: auto; }
.article .meta { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.article img.cover { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); margin-bottom: 32px; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.article h2 { font-size: 1.5rem; margin-top: 1.6em; }
.article h3 { font-size: 1.15rem; margin-top: 1.4em; }
.article blockquote {
  border-left: 4px solid var(--yellow);
  background: var(--purple-50);
  margin: 1.4em 0; padding: 16px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 64px);
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin: 0 0 .3em; }
.cta-band p { margin: 0; color: #F1E3F4; }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; margin-inline: auto; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; color: var(--purple-deep); }
.legal h3 { font-size: 1.05rem; margin-top: 1.5em; }
.legal table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.legal th, .legal td { border: 1px solid rgba(46,42,46,.15); padding: 10px 14px; text-align: left; }
.legal th { background: var(--purple-50); font-family: var(--font-head); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--slate-dark); color: #D7DCE8; margin-top: clamp(56px, 8vw, 96px); }
/* slate wave rising above the footer */
.site-footer::before {
  content: ""; position: absolute; top: -23px; left: 0; right: 0; height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cpath d='M0 18 Q 15 6 30 14 T 60 14 T 90 14 T 120 10 L120 26 L0 26 Z' fill='%233A4966'/%3E%3C/svg%3E") repeat-x bottom / 240px 100%;
  pointer-events: none;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1.1fr .8fr .8fr;
  gap: clamp(24px, 3.5vw, 48px);
  padding: clamp(44px, 6vw, 72px) 0 36px;
}
@media (max-width: 1000px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: #fff; font-size: 1.05rem; margin-bottom: 1em;
  padding-bottom: .5em; position: relative;
}
.site-footer h4::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 40px; height: 3px; border-radius: 2px; background: var(--yellow);
}
.site-footer__brand img { height: 76px; margin-bottom: 16px; }
.site-footer__brand p { font-size: .95rem; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, .13); color: #fff;
  transition: background .2s ease, color .2s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.footer-social a:hover { background: var(--yellow); color: var(--purple-deep); transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; fill: currentColor; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .7em; display: flex; align-items: flex-start; gap: 9px; }
.footer-ico { flex: 0 0 15px; width: 15px; height: 15px; fill: var(--yellow); margin-top: 6px; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 20px 0;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .88rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .5s ease, transform .6s cubic-bezier(.34, 1.4, .64, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__badge { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--purple); color: #fff; font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  transform: translateY(8px);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--purple-dark); }

/* ---------- Mobile bottom action bar (Call / Email / Facebook) ---------- */
.mobile-actionbar { display: none; }
@media (max-width: 700px) {
  .topbar { display: none; } /* replaced by the bottom action bar */
  .mobile-actionbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: var(--purple);
    padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 18px rgba(46, 42, 46, .22);
  }
  .mobile-actionbar a, .mobile-actionbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 2px;
    background: none; border: 0; cursor: pointer;
    color: #fff;
    font-family: var(--font-head); font-weight: 700; font-size: .64rem;
    letter-spacing: .03em;
    white-space: nowrap;
  }
  .mobile-actionbar a:hover, .mobile-actionbar a:active,
  .mobile-actionbar button:hover, .mobile-actionbar button:active { color: var(--yellow); }
  .mobile-actionbar a + a, .mobile-actionbar a + button { border-left: 1px solid rgba(255, 255, 255, .18); }
  .mobile-actionbar svg { width: 22px; height: 22px; fill: currentColor; }
  /* keep page content and controls clear of the fixed bar */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .to-top { bottom: calc(76px + env(safe-area-inset-bottom)); right: 16px; }
}

/* ---------- Highlights — playful sticker-board redesign ---------- */
.highlights-fun {
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(rgba(149, 60, 161, .07) 1.5px, transparent 1.6px);
  background-size: 26px 26px;
}
.highlights-fun .container { position: relative; z-index: 1; }

/* marker-pen highlight on the last word */
.marker {
  background: linear-gradient(transparent 60%, var(--yellow) 60%, var(--yellow) 95%, transparent 95%);
  padding: 0 .14em;
  border-radius: 4px;
}
/* crayon squiggle under the heading */
.squiggle { display: block; width: 210px; height: auto; margin: 8px auto 0; }

.fun-grid { gap: 32px 28px; }

.fun-card {
  --tone: var(--coral);
  position: relative;
  text-align: center;
  padding: 34px 22px 28px;
  background: #fff;
  background: color-mix(in srgb, var(--tone) 9%, #fff);
  border: 2.5px dashed color-mix(in srgb, var(--tone) 48%, #fff);
  /* uneven radii for a hand-drawn sticker feel */
  border-radius: 26px 34px 24px 32px / 32px 24px 34px 26px;
  transform: rotate(var(--tilt, -1.4deg));
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, border .2s ease;
}
.fun-card:nth-child(6n+2) { --tilt: 1.6deg; }
.fun-card:nth-child(6n+3) { --tilt: -.8deg; }
.fun-card:nth-child(6n+4) { --tilt: 1.1deg; }
.fun-card:nth-child(6n+5) { --tilt: -1.8deg; }
.fun-card:nth-child(6n)   { --tilt: .9deg; }
/* rotate the crayon-box palette across cards */
.fun-card:nth-child(5n+2) { --tone: var(--blue); }
.fun-card:nth-child(5n+3) { --tone: var(--gold); }
.fun-card:nth-child(5n+4) { --tone: var(--purple); }
.fun-card:nth-child(5n)   { --tone: var(--green); }
.fun-card:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.03);
  border-style: solid;
  box-shadow: 0 16px 32px color-mix(in srgb, var(--tone) 28%, transparent);
}
.fun-card::after {
  content: "\2726";
  position: absolute; top: 12px; right: 18px;
  color: var(--tone); opacity: .65;
  font-size: 1.05rem; line-height: 1;
}
.fun-card h3 { font-size: 1.05rem; color: var(--slate); margin: 0; }

.fun-card__badge {
  width: 92px; height: 92px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid color-mix(in srgb, var(--tone) 40%, #fff);
  box-shadow: 0 6px 16px rgba(46, 42, 46, .13);
  display: grid; place-items: center;
}
.fun-card__badge img { width: 52px; height: 52px; }
.fun-card:hover .fun-card__badge { animation: wiggle .5s ease; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-7deg); }
  70% { transform: rotate(6deg); }
}

/* floating background doodles */
.doodle { position: absolute; z-index: 0; pointer-events: none; animation: floaty 7s ease-in-out infinite alternate; }
.doodle--star {
  width: 28px; height: 28px; background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  top: 14%; left: 5%;
}
.doodle--star2 { left: auto; top: auto; right: 7%; bottom: 16%; width: 20px; height: 20px; background: var(--coral); animation-duration: 9s; }
.doodle--ring { width: 36px; height: 36px; border: 5px solid var(--blue); border-radius: 50%; top: 20%; right: 4%; animation-duration: 8s; }
.doodle--ring2 { right: auto; top: auto; left: 3.5%; bottom: 18%; width: 22px; height: 22px; border-width: 4px; border-color: var(--purple); animation-duration: 10s; }
.doodle--dot { width: 14px; height: 14px; border-radius: 50%; background: var(--green); top: 7%; right: 24%; animation-duration: 6s; }
.doodle--tri {
  width: 26px; height: 24px; background: var(--gold);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  top: 58%; left: 2.5%; animation-duration: 11s;
}
@keyframes floaty {
  from { transform: translateY(0) rotate(-10deg); }
  to   { transform: translateY(-20px) rotate(12deg); }
}
@media (max-width: 640px) { .doodle { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .doodle, .fun-card, .fun-card__badge, .brand img,
  .page-hero__inner::before, .page-hero__inner::after { animation: none !important; transition: none !important; }
}

/* Public calendar widget */
.ds-cal { max-width: 900px; margin: 0 auto; }
.ds-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ds-cal__head h3 { font-family: "Nunito"; font-size: 22px; margin: 0; }
.ds-cal__nav { display: flex; gap: 8px; }
.ds-cal__nav button { border: 1.5px solid var(--line, #e8e4ec); background: #fff; border-radius: 999px; width: 38px; height: 38px; cursor: pointer; font-size: 18px; }
/* minmax(0,1fr): long event pills must truncate, not stretch their column */
.ds-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ds-cal__dow { text-align: center; font-size: 12px; font-weight: 600; color: #8a8593; padding: 6px 0; text-transform: uppercase; }
.ds-cal__day { min-height: 86px; background: #fff; border-radius: 10px; padding: 6px; font-size: 12px; box-shadow: 0 1px 4px rgba(45,42,50,.06); }
.ds-cal__day--other { opacity: .35; }
.ds-cal__day--today { outline: 2px solid #953CA1; }
.ds-cal__num { font-weight: 700; margin-bottom: 4px; }
.ds-cal__event { display: block; color: #fff; border-radius: 6px; padding: 2px 6px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
@media (max-width: 700px) { .ds-cal__day { min-height: 60px; } }
@media (max-width: 480px) {
  .ds-cal__grid { gap: 3px; }
  .ds-cal__day { min-height: 48px; padding: 4px; border-radius: 7px; }
  .ds-cal__event { padding: 1px 4px; font-size: 10px; }
  .ds-cal__head h3 { font-size: 17px; }
}

/* Parent portal */
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .portal-grid { grid-template-columns: 1fr; } }
.portal-card {
  background: #fff; border-radius: 16px; padding: 26px;
  box-shadow: 0 4px 18px rgba(45, 42, 50, .07); margin-bottom: 24px;
}
.portal-card h2 { font-family: "Nunito", sans-serif; font-size: 1.35rem; margin: 0 0 14px; }
.portal-card h2::after { content: ""; display: block; width: 38px; height: 4px; border-radius: 999px; background: #FFC94D; margin-top: 8px; }
.progress-track { background: #f0edf3; border-radius: 999px; height: 12px; margin: 4px 0 18px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, #953CA1, #b95cc6); height: 100%; border-radius: 999px; transition: width .4s ease; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0edf3; font-size: .95rem; }
.check-list li:last-child { border-bottom: 0; }
.check-list .check {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  background: #f0edf3; color: #8a8593; border: 1.5px solid #e8e4ec;
}
.check-list li.is-done .check { background: #e6f7e9; color: #1c7a34; border-color: #bfe7c8; }
.check-list li.is-done { color: #8a8593; }
.invoice-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0edf3; font-size: .95rem; }
.invoice-row:last-of-type { border-bottom: 0; }
.invoice-row small { color: #8a8593; }
.invoice-row .amount { text-align: right; font-weight: 600; }
.invoice-row .amount small { font-weight: 400; text-transform: capitalize; }
.event-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0edf3; font-size: .95rem; }
.event-row:last-of-type { border-bottom: 0; }
.event-row b { font-family: "Nunito", sans-serif; white-space: nowrap; color: #953CA1; }

/* Legal & policies index */
.legal-index { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; max-width: 820px; }
.legal-index a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: #fff; border-radius: 16px; padding: 20px 24px;
  border: 1.5px solid #ece7f0; box-shadow: 0 2px 10px rgba(45, 42, 50, .05);
  color: var(--ink, #2E2A2E); text-decoration: none;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), border-color .2s ease, box-shadow .2s ease;
}
.legal-index a:hover { transform: translateY(-3px); border-color: var(--purple); box-shadow: 0 8px 22px rgba(149, 60, 161, .14); }
.legal-index__body { display: flex; flex-direction: column; gap: 3px; }
.legal-index__body b { font-family: "Nunito", sans-serif; font-size: 1.1rem; color: var(--purple-deep, #5E2566); }
.legal-index__body > span { font-size: .92rem; color: var(--text, #585458); }
.legal-index__meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: .8rem; color: var(--muted, #8A848A); }
.legal-index__arrow { color: var(--purple); font-size: 1.2rem; }
.muted-note { font-size: .9rem; color: var(--muted, #8A848A); }
@media (max-width: 560px) {
  .legal-index a { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Flash messages (portal / auth redirects land on public pages) */
.flash-stack { padding-top: 18px; }
.flash { padding: 12px 18px; border-radius: 12px; margin-bottom: 10px; font-size: .95rem; }
.flash--success { background: #e6f7e9; color: #1c7a34; }
.flash--error { background: #fdeaea; color: #b3261e; }
.flash--message { background: #eef0fd; color: #3b4bbd; }

/* Portal navigation tabs */
.page-hero--portal .page-hero__inner { padding-bottom: 24px; }
/* Family avatars in the portal hero: child photos, or initial bubbles as fallback */
.portal-hero__id { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.portal-hero__avatars { display: flex; flex-shrink: 0; }
.portal-hero__avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 4px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 18px rgba(20, 16, 22, .3);
  background: #fff;
}
.portal-hero__avatar + .portal-hero__avatar { margin-left: -20px; }
.portal-hero__avatar--initial {
  display: flex; align-items: center; justify-content: center;
  font-family: "Nunito", sans-serif; font-weight: 800; font-size: 2.1rem;
  background: var(--yellow); color: var(--purple-deep);
}
@media (max-width: 700px) {
  .portal-hero__avatar { width: 62px; height: 62px; border-width: 3px; }
  .portal-hero__avatar--initial { font-size: 1.5rem; }
  .portal-hero__id { gap: 14px; }
}
.portal-nav { background: #fff; box-shadow: 0 2px 8px rgba(46, 42, 46, .08); position: relative; z-index: 5; }
.portal-nav__inner { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 0; }
.portal-nav a {
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.2;
  font-family: var(--font-head); font-weight: 800; font-size: .95rem;
  color: var(--purple); padding: 9px 18px; border-radius: 999px;
}
.portal-nav a:hover { background: var(--purple-50); }
.portal-nav a.is-active { background: var(--purple); color: #fff; }
.nav-badge {
  display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px;
  background: var(--yellow); color: var(--purple-deep); font-size: .75rem;
  font-weight: 800; text-align: center; vertical-align: middle;
}
.portal-nav a.is-active .nav-badge { background: var(--yellow); }
.portal-body { padding-top: clamp(32px, 5vw, 48px); }

/* Portal extras: what's-new, documents, progress, messages */
.portal-card--highlight { border-left: 5px solid var(--yellow); }
.doc-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid #f0edf3; font-size: .95rem; }
.doc-row:last-of-type { border-bottom: 0; }
.pill-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--purple-100); color: var(--purple); font-size: .78rem; font-weight: 700;
}
.progress-entry { padding: 14px 0; border-bottom: 1px solid #f0edf3; }
.progress-entry:last-of-type { border-bottom: 0; }
.progress-entry__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.progress-entry p { margin: 0; white-space: pre-wrap; }
.msg-thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; max-height: 60vh; overflow-y: auto; padding-right: 6px; }
.msg { max-width: 80%; }
.msg--mine { align-self: flex-end; text-align: right; }
.msg--theirs { align-self: flex-start; }
.msg__bubble {
  display: inline-block; padding: 12px 16px; border-radius: 16px;
  font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left;
}
.msg--mine .msg__bubble { background: var(--purple); color: #fff; border-bottom-right-radius: 4px; }
.msg--theirs .msg__bubble { background: var(--bg-soft); border-bottom-left-radius: 4px; }
.msg__meta { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.msg-compose { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.msg-compose textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid #e8e4ec; border-radius: 12px;
  font: inherit; resize: vertical;
}
.msg-compose textarea:focus { outline: 2px solid rgba(149, 60, 161, .35); border-color: var(--purple); }

/* Portal sign-out pill, pushed to the right of the tab row */
.portal-nav__signout { margin-left: auto; border: 2px solid var(--purple-100); }
/* Phones: portal nav becomes one swipeable row; cards breathe less */
@media (max-width: 560px) {
  .portal-nav__inner {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 10px 2px;
  }
  .portal-nav__inner::-webkit-scrollbar { display: none; }
  .portal-nav a { white-space: nowrap; flex: 0 0 auto; }
  .portal-card { padding: 18px 16px; }
  .page-hero--portal .page-hero__inner { padding-top: 40px; }
  /* "What's new" rows: let text wrap, date gets its own indented line */
  .check-list li { flex-wrap: wrap; align-items: flex-start; row-gap: 2px; }
  .check-list li .check { margin-top: 1px; }
  .check-list li small { flex-basis: 100%; padding-left: 32px; }
}

/* Child rows with profile pictures */
.child-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f0edf3; }
.child-row:last-of-type { border-bottom: 0; }
.child-row--header { border-bottom: 0; padding: 0 0 10px; }
.child-row--header h2 { margin-bottom: 2px; }
.child-row--header p { margin: 0; }
.child-row__info { display: flex; flex-direction: column; gap: 2px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(46, 42, 46, .15);
}
.avatar--initial {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple-100); color: var(--purple);
  font-family: var(--font-head); font-weight: 800; font-size: 1.4rem;
}
.portal-card form.child-row__photo > label { font-size: .8rem; color: var(--purple); cursor: pointer; font-weight: 600; margin: 0; display: inline; }
.portal-card form.child-row__photo input[type="file"][name="photo"] { display: none; }

/* Message attachments */
.msg__attachment { font-weight: 600; }
.msg--mine .msg__attachment { color: #fff; text-decoration: underline; }
.portal-card form label.msg-compose__attach { font-size: .85rem; color: var(--purple); font-weight: 600; cursor: pointer; margin: 0; }
.portal-card form label.msg-compose__attach input[type="file"][name="attachment"] { display: inline; width: auto; border: 0; padding: 0; margin: 0; font-size: .8rem; background: transparent; }

/* Portal card forms (document upload etc.) */
.portal-card form > label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 14px; }
.portal-card form input:not([type="checkbox"]):not([type="radio"]),
.portal-card form select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1.5px solid #e8e4ec; border-radius: 10px; font: inherit; background: #fff;
}
.portal-card form input:focus, .portal-card form select:focus {
  outline: 2px solid rgba(149, 60, 161, .35); border-color: var(--purple);
}

/* Overdue invoices stand out for parents */
.invoice-row--overdue .amount { color: #b3261e; }
.invoice-row--overdue .amount small { font-weight: 700; text-transform: uppercase; }

/* Parents can remove their own uploads */
.doc-row__remove { margin-top: 2px; }
.doc-remove { background: none; border: 0; padding: 0; color: #b3261e; font-size: .8rem; cursor: pointer; }
.doc-remove:hover { text-decoration: underline; }

/* Portal nav on phones: keep the tabs on one row, trim the tall hero */
@media (max-width: 480px) {
  .portal-nav a { padding: 8px 12px; font-size: .85rem; }
  .portal-nav__inner { gap: 4px; }
  .page-hero--portal .page-hero__inner { padding: 40px 0 18px; }
}
