/* Kidzee Madipakkam — a school exercise book: blue ruled lines, a red margin, pencil yellow. */

:root {
  --paper: #f6f9fe;
  --white: #ffffff;
  --ink: #1c2754;
  --ink-soft: #4a5580;
  --rule: #cfdcf2;
  --margin: #e2464f;
  --pencil: #ffc83d;
  --pencil-deep: #e9ac12;
  --leaf: #237a52;
  --alert: #b3261e;

  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --line: 2rem;           /* one ruled line */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

main { flex: 1; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  font-weight: 700;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

a { color: var(--ink); text-decoration-color: var(--margin); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--margin); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--white); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0.5rem; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }
.good { color: var(--leaf); font-weight: 700; }
.overdue { color: var(--alert); font-weight: 700; }
.empty { color: var(--ink-soft); font-style: italic; }

/* ---- Contact & social bar (very top of public pages) ---- */

.contact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.35rem var(--gutter);
  background: var(--ink);
  color: var(--white);
  font-size: 0.9rem;
}
.contact-bar ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.contact-list { gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.social-list { gap: 0.25rem; }
.contact-bar a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--white);
  text-decoration: none;
  border-radius: 6px;
}
.contact-bar a:hover { color: var(--pencil); }
.contact-bar a:focus-visible { outline-color: var(--pencil); }
.social-list a { justify-content: center; width: 2rem; height: 2rem; }
.social-list a:hover { background: rgba(255, 255, 255, 0.12); }

.icon { width: 1.15rem; height: 1.15rem; flex: none; fill: currentColor; }
.icon-stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-stroke .icon-dot { fill: currentColor; stroke: none; }

/* ---- Top bar & footer ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem var(--gutter);
  background: var(--white);
  border-bottom: 2px solid var(--rule);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.wordmark::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.12em;
  border-radius: 50%;
  background: var(--pencil);
  box-shadow: 0 0 0 2px var(--ink);
}

.topbar-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar-actions form { margin: 0; }
.topbar-link { font-weight: 700; }
.who { color: var(--ink-soft); font-size: 0.95rem; }
.who-role {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.5rem;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--ink);
}

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 1.5rem var(--gutter);
  border-top: 2px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.footer p { margin: 0; }

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--ink);
  line-height: 1.2;
}
.btn-pencil {
  background: var(--pencil);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.btn-pencil:hover { background: var(--pencil-deep); color: var(--ink); }
.btn-pencil:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn-quiet { background: var(--white); color: var(--ink); }
.btn-quiet:hover { background: var(--paper); color: var(--ink); }
.btn-large { font-size: 1.15rem; padding: 0.8rem 1.5rem; }
.btn-block { width: 100%; }

/* ---- Notebook page: the one bold idea ---- */

.notebook {
  position: relative;
  background-color: var(--white);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--line) - 2px),
    var(--rule) calc(var(--line) - 2px),
    var(--rule) var(--line)
  );
  background-position: 0 1.2rem;
}
.notebook::before {
  /* the red margin line */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(1.25rem, 7vw, 6rem);
  width: 2px;
  background: var(--margin);
  opacity: 0.75;
}

.hero { padding: calc(var(--line) * 2) 0 calc(var(--line) * 2.5); }
.notebook-inner {
  position: relative;
  padding-left: calc(clamp(1.25rem, 7vw, 6rem) + clamp(1rem, 3vw, 2.5rem));
  padding-right: var(--gutter);
  max-width: 64rem;
}
.hero-title {
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 11ch;
  margin-bottom: var(--line);
}
.hero-lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: var(--line);
  max-width: 52ch;
  margin-bottom: var(--line);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-title { animation: write-in 700ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes write-in {
    /* negative top/bottom insets leave room for ascenders and descenders */
    from { clip-path: inset(-25% 100% -25% 0); }
    to   { clip-path: inset(-25% -5% -25% 0); }
  }
}

/* ---- Landing bands ---- */

.band { padding: 3rem var(--gutter); }
.band-soft { background: var(--paper); border-top: 2px solid var(--rule); }
.band-inner { max-width: 64rem; margin: 0 auto; }
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem 3rem; align-items: start; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative;
  padding: 0.75rem 0 0.75rem 2.25rem;
  border-bottom: 2px solid var(--rule);
  max-width: var(--measure);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1rem;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 3px solid var(--leaf);
  border-bottom: 3px solid var(--leaf);
  transform: rotate(-45deg);
}

.school-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0 2rem;
}
.school-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 2px solid var(--rule);
}
.school-name { font-weight: 700; }
.school-city { color: var(--ink-soft); }

/* ---- Login ---- */

.login-wrap {
  display: flex;
  justify-content: center;
  padding: calc(var(--line) * 2) var(--gutter) calc(var(--line) * 3);
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 26rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 6px 6px 0 var(--pencil);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field input {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--pencil); }
.field-error, .form-error { color: var(--alert); }
.form-error {
  border-left: 4px solid var(--alert);
  background: #fdeceb;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.form-error p { margin: 0; }
.login-help { margin: 1.25rem 0 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---- Dashboard pages ---- */

.page { max-width: 72rem; margin: 0 auto; padding: 2rem var(--gutter) 3rem; }
.page > h1 + .muted { margin-top: -0.25rem; }
.crumb { margin-bottom: 0.5rem; font-size: 0.95rem; }
.crumb a::before { content: "‹ "; }

.panel {
  background: var(--white);
  border: 2px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.stats-inline { margin-top: 0.5rem; }
.stat {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--pencil);
  background: var(--white);
}
.panel .stat { background: var(--paper); }
.stat-alert { border-left-color: var(--alert); }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1.1; }
.stat-value small { font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
.stat-label { color: var(--ink-soft); font-size: 0.95rem; }

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1.5px solid var(--rule); vertical-align: top; }
.table thead th { font-size: 0.9rem; color: var(--ink-soft); font-weight: 700; border-bottom-width: 2px; }
.table tbody th { font-weight: 400; }
.table .nowrap { white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table.compact th, .table.compact td { padding: 0.45rem 0.5rem 0.45rem 0; }

.rating { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rating .dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--ink); }
.rating .dot.on { background: var(--pencil); }
.rating-word { margin-left: 0.4rem; font-size: 0.9rem; color: var(--ink-soft); }

.child-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.child-head .muted { margin: 0; }
.child-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; }
.child-side .stat { margin-bottom: 1.25rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 0.35rem 0; border-bottom: 1.5px solid var(--rule); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }

.att-strip { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 4px; }
.att { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 6px; font-size: 0.8rem; font-weight: 700; }
.legend .att { width: 0.9rem; height: 0.9rem; vertical-align: -2px; margin-left: 0.6rem; }
.att-present { background: #d7efe3; color: var(--leaf); }
.att-late { background: #fff1c7; color: #7a5600; }
.att-absent { background: #fbd9d7; color: var(--alert); }
.legend { font-size: 0.9rem; color: var(--ink-soft); margin: 0.75rem 0 0; }

.notices { list-style: none; padding: 0; margin: 0; }
.notices li { padding: 0.9rem 0; border-bottom: 1.5px solid var(--rule); max-width: var(--measure); }
.notices li:last-child { border-bottom: 0; }
.notices h3 { margin-bottom: 0.15rem; }
.notice-meta { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.4rem; }

.fill { display: inline-block; width: 3.5rem; height: 0.5rem; margin-right: 0.4rem; border-radius: 999px; background: var(--rule); overflow: hidden; vertical-align: middle; }
.fill span { display: block; height: 100%; max-width: 100%; background: var(--ink); }

.messages { max-width: 72rem; margin: 1rem auto 0; padding: 0 var(--gutter); }
.message { background: var(--white); border-left: 4px solid var(--pencil); padding: 0.6rem 0.9rem; }

/* ---- Small screens ---- */

@media (max-width: 760px) {
  .split, .child-grid, .two-col { grid-template-columns: 1fr; }
  .who { display: none; }
  .contact-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .contact-list a { width: 2rem; height: 2rem; justify-content: center; }
  .login-card { padding: 1.5rem; box-shadow: 4px 4px 0 var(--pencil); }
}

/* ======================================================================
   Home page: menu bar, carousel, content boxes, rolling events
   ====================================================================== */

/* ---- Menu bar ---- */

.site-nav {
  position: relative;
  z-index: 20;
  background: var(--white);
  border-bottom: 2px solid var(--rule);
  padding: 0 var(--gutter);
}
.nav-toggle { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.25rem; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.85rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { border-bottom-color: var(--pencil); color: var(--ink); }
.caret { width: 0.75rem; height: 0.75rem; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 150ms; }
.nav-link[aria-expanded="true"] .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--pencil);
}
.dropdown a { display: block; padding: 0.5rem 1rem; text-decoration: none; color: var(--ink); }
.dropdown a:hover, .dropdown a:focus-visible { background: var(--paper); color: var(--ink); }

/* ---- Carousel ---- */

.carousel { position: relative; background: var(--ink); }
.carousel-viewport { position: relative; aspect-ratio: 16 / 6.5; max-height: 560px; width: 100%; overflow: hidden; }
.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 0s linear 700ms;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 700ms ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide figcaption {
  position: absolute;
  left: clamp(1rem, 5vw, 4rem);
  bottom: clamp(3.5rem, 7vw, 5rem);
  max-width: min(32rem, calc(100% - 2rem));
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  border-left: 6px solid var(--pencil);
}
.carousel-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.carousel-btn {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.carousel-btn:hover { background: var(--pencil); }
.carousel-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.carousel-btn .icon-play { fill: currentColor; stroke: none; }
.carousel-pause .icon-play, .carousel.is-paused .carousel-pause .icon-pause { display: none; }
.carousel.is-paused .carousel-pause .icon-play { display: block; }
.carousel-dots { display: flex; gap: 0.35rem; padding: 0.45rem 0.6rem; border-radius: 999px; background: rgba(28, 39, 84, 0.55); }
.dot-btn { width: 0.7rem; height: 0.7rem; padding: 0; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; }
.dot-btn.is-active { background: var(--pencil); border-color: var(--pencil); }

/* ---- Content boxes + events ---- */

.home-grid {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(16rem, 1fr);
  gap: 1.75rem;
  align-items: start;
}
.home-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1.25rem; }

.info-box {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
.info-box:nth-child(3n + 1) { border-top: 8px solid var(--pencil); }
.info-box:nth-child(3n + 2) { border-top: 8px solid var(--leaf); }
.info-box:nth-child(3n + 3) { border-top: 8px solid var(--margin); }
.info-box-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-bottom: 2px solid var(--ink); }
.info-box-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.info-box-body h2 { font-size: 1.3rem; }
.info-box-body p { margin-bottom: 0.75rem; }
.info-box-link { margin-top: auto; font-weight: 700; }

.events {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 1.1rem 1.1rem 0.5rem;
  position: sticky;
  top: 1rem;
}
.events h2 { font-size: 1.3rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--rule); margin-bottom: 0; }
.events-window { position: relative; max-height: 24rem; overflow: hidden; }
.events-window:focus-visible { outline-offset: 2px; }
.events-window.is-rolling { height: 24rem; }
.events-window.is-rolling::before, .events-window.is-rolling::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5rem;
  z-index: 1;
  pointer-events: none;
}
.events-window.is-rolling::before { top: 0; background: linear-gradient(var(--white), transparent); }
.events-window.is-rolling::after { bottom: 0; background: linear-gradient(transparent, var(--white)); }
.events-list { list-style: none; margin: 0; padding: 0; }

.event { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.75rem 0; border-bottom: 1.5px solid var(--rule); }
.event-date {
  flex: none;
  width: 3.1rem;
  text-align: center;
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  line-height: 1;
}
.event-day { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; padding: 0.3rem 0 0.15rem; }
.event-month { display: block; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0; background: var(--pencil); }
.event-holiday .event-month { background: var(--margin); color: var(--white); }
.event-text { display: flex; flex-direction: column; gap: 0.15rem; }
.event-title { font-weight: 700; line-height: 1.3; }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; font-size: 0.85rem; color: var(--ink-soft); }
.event-kind { font-weight: 700; color: var(--leaf); }
.event-holiday .event-kind { color: var(--margin); }

@media (prefers-reduced-motion: no-preference) {
  .events-window.is-rolling .events-track {
    animation: roll-up calc(var(--roll-seconds) * 3.5s) linear infinite;
  }
  .events-window.is-rolling:hover .events-track,
  .events-window.is-rolling:focus-within .events-track { animation-play-state: paused; }
  @keyframes roll-up {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .events-window.is-rolling { overflow-y: auto; }
  .events-window.is-rolling .events-list[aria-hidden="true"] { display: none; }
}

/* ---- Home page on small screens ---- */

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .events { position: static; }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.5rem 0;
    padding: 0.45rem 0.8rem;
    font: inherit;
    font-weight: 700;
    color: var(--ink);
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 8px;
    cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: currentColor;
    position: relative;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-list { display: none; flex-direction: column; padding-bottom: 0.5rem; }
  .site-nav.is-open .nav-list { display: flex; }
  .nav-link { width: 100%; justify-content: space-between; border-bottom: 0; border-left: 3px solid transparent; }
  .nav-link:hover, .nav-link[aria-expanded="true"] { border-left-color: var(--pencil); }
  .dropdown { position: static; box-shadow: none; border-width: 0 0 0 2px; border-radius: 0; margin-left: 1rem; min-width: 0; }
  .carousel-viewport { aspect-ratio: 4 / 3; }
  .carousel-dots { display: none; }
  .info-box-img { aspect-ratio: 16 / 7; }
}

/* ======================================================================
   Inner pages, forms, call-to-action band, testimonials, directions, transport
   ====================================================================== */

[hidden] { display: none !important; }

.page.wide { max-width: 76rem; }

.page-head { padding: calc(var(--line) * 1.25) 0 calc(var(--line) * 1.25); }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 0.5rem; }
.page-intro { font-size: 1.2rem; line-height: var(--line); max-width: 52ch; margin: 0; }

/* Content pages */
.prose-wrap { max-width: 72rem; margin: 0 auto; padding: 2.5rem var(--gutter) 3.5rem; display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 3rem; align-items: start; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child, .prose-img + h2 { margin-top: 0; }
.prose-img { width: 100%; border-radius: 6px; border: 2px solid var(--ink); margin-bottom: 2rem; }
.cta-aside { background: var(--white); border: 2px solid var(--ink); border-radius: 6px; padding: 1.25rem; box-shadow: 5px 5px 0 var(--pencil); position: sticky; top: 1rem; }
.cta-aside h2 { font-size: 1.25rem; }
.cta-aside-link { display: inline-block; margin-top: 0.9rem; font-weight: 700; }

/* Forms */
.form-page { max-width: 64rem; margin: 0 auto; padding: 2.5rem var(--gutter) 3.5rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.form-card { background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 1.75rem; }
.form-side { max-width: 40ch; }
.form-side h2 { font-size: 1.25rem; }
.field textarea, .field select {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.field textarea:focus, .field select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--pencil); }
.field-help { font-size: 0.9rem; color: var(--ink-soft); margin: 0.3rem 0 0; }
.optional { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.6rem; align-items: start; padding: 0.8rem; background: var(--paper); border-radius: 10px; }
.field-check input { width: 1.2rem; height: 1.2rem; margin: 0.15rem 0 0; accent-color: var(--ink); }
.field-check label { margin: 0; }
.field-check .field-help, .field-check .field-error { grid-column: 2; }
.field-radios { border: 0; padding: 0; margin: 0 0 1.1rem; }
.field-radios legend { font-weight: 700; margin-bottom: 0.4rem; padding: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.radio-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border: 2px solid var(--rule); border-radius: 999px; cursor: pointer; }
.radio-pill:has(input:checked) { border-color: var(--ink); background: var(--pencil); }
.field .radio-pill input { width: auto; padding: 0; margin: 0; accent-color: var(--ink); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.message-success { border-left-color: var(--leaf); }

/* Call-to-action band on the home page */
.cta-band { background: var(--ink); padding: 1.75rem var(--gutter); }
.cta-band-inner { max-width: 76rem; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  color: var(--ink);
  border-radius: 10px;
  border: 2px solid var(--white);
  text-decoration: none;
  box-shadow: 0 4px 0 var(--pencil);
}
.cta:hover { background: var(--pencil); color: var(--ink); }
.cta:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--pencil); }
.cta:focus-visible { outline-color: var(--pencil); }
.cta svg { width: 2.2rem; height: 2.2rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cta strong { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.cta-sub { display: block; font-size: 0.95rem; color: var(--ink-soft); }

/* Testimonials */
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.band-head a { font-weight: 700; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.25rem; }
.review { margin: 0; background: var(--white); border: 2px solid var(--rule); border-radius: 10px; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.review blockquote { margin: 0; flex: 1; }
.review figcaption { font-size: 0.95rem; }
.review-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.stars { letter-spacing: 0.08em; font-size: 1.1rem; }
.star { color: var(--rule); }
.star.on { color: var(--pencil-deep); }
.review-source { font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1.5px solid var(--rule); }
.review-source-google { border-color: var(--ink); }
.review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.1rem; }
.review-form-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2.5rem; margin-top: 3rem; padding-top: 2.5rem; border-top: 2px solid var(--rule); align-items: start; }

/* Directions */
.school-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.5rem; background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.5rem; }
.school-card-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 0; }
.school-map { width: 100%; min-height: 16rem; border: 2px solid var(--rule); border-radius: 8px; background: var(--paper); }

/* Transport */
.route-search { max-width: 28rem; margin-bottom: 2rem; }
.route-search input { width: 100%; font: inherit; padding: 0.7rem 0.9rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--white); }
.route-search input:focus { outline: none; box-shadow: 0 0 0 3px var(--pencil); }
.route-school { margin-bottom: 2.5rem; }
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.25rem; }
.route { background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 1.25rem; border-top: 8px solid var(--pencil); }
.route h3 { font-size: 1.2rem; }
.route h4 { font-size: 0.95rem; margin: 0.9rem 0 0.4rem; font-family: var(--font-body); }
.route-times { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; color: var(--ink-soft); }
.route-times strong { color: var(--ink); }
.area-tags { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.area-tags li { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--rule); font-size: 0.92rem; }
.route-stops summary { cursor: pointer; font-weight: 700; }
.route-stops ol { margin: 0.5rem 0 0.75rem; padding-left: 1.4rem; }
.route-none { font-size: 1.05rem; padding: 1rem; background: var(--white); border-left: 4px solid var(--margin); }

/* Footer links */
.footer { flex-direction: column; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a { font-weight: 700; color: var(--ink); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; }
.footer-meta p { margin: 0; }

@media (max-width: 900px) {
  .prose-wrap, .form-page, .review-form-wrap, .school-card { grid-template-columns: 1fr; }
  .cta-aside { position: static; }
  .cta-band-inner { grid-template-columns: 1fr; }
}

.stat-link { text-decoration: none; color: var(--ink); }
.stat-link:hover { background: var(--paper); color: var(--ink); }

/* Calendar */
.calendar-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.calendar-filter { display: flex; align-items: center; gap: 0.6rem; }
.calendar-filter label { font-weight: 700; }
.calendar-filter select { font: inherit; padding: 0.5rem 0.75rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--white); color: var(--ink); }
.cal-month { margin-bottom: 2rem; }
.cal-month h2 { padding-bottom: 0.4rem; border-bottom: 3px solid var(--pencil); display: inline-block; }
.cal-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 0 2rem; }
.cal-list .event.is-past { opacity: 0.55; }

/* Tablets: two-column layouts where there's room */
@media (min-width: 761px) and (max-width: 1100px) {
  .home-boxes { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
  .nav-link { padding: 0.8rem 0.6rem; }
  .cta { padding: 0.9rem 1rem; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .cta-band-inner { grid-template-columns: repeat(3, 1fr); }
  .cta { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ======================================================================
   Portals: parents (/parentspage), teachers (/teacherslogin), owner (/bppage)
   ====================================================================== */

.portal { max-width: 84rem; margin: 0 auto; padding: 1.5rem var(--gutter) 3rem; display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.portal-side { position: sticky; top: 1rem; background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 1rem; }
.portal-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; margin: 0 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 3px solid var(--pencil); }
.portal-nav { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.portal-nav a { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.97rem; }
.portal-nav a:hover { background: var(--paper); color: var(--ink); }
.portal-nav a[aria-current="page"] { background: var(--pencil); }
.badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: var(--margin); color: var(--white); font-size: 0.78rem; font-weight: 700; }
.child-switch { display: grid; gap: 0.3rem; margin-bottom: 0.5rem; }
.child-switch label { font-weight: 700; font-size: 0.9rem; }
.child-switch select, .date-pick input, .search-row input { font: inherit; padding: 0.5rem 0.7rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--white); color: var(--ink); }
.child-chip { margin: 0 0 0.5rem; padding: 0.6rem 0.7rem; background: var(--paper); border-radius: 8px; }
.portal-main, .portal-side { min-width: 0; }
.portal-main > h1 { margin-bottom: 0.25rem; }
.portal-main .panel:first-of-type { margin-top: 1.25rem; }
.title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1rem; }
.title-row h1, .title-row h2 { margin: 0; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1.25rem; }
.portal-grid.two { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.25rem; align-items: start; }
.portal-grid.two > .form-card, .flush-top { margin-top: 1.5rem; }
.form-card.narrow { max-width: 36rem; margin-top: 1.5rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.9rem; margin-top: 1.25rem; }
.tile { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.9rem 1rem; background: var(--white); border: 2px solid var(--rule); border-left: 5px solid var(--pencil); border-radius: 8px; text-decoration: none; color: var(--ink); }
a.tile:hover { border-color: var(--ink); border-left-color: var(--pencil); color: var(--ink); }
.tile-alert { border-left-color: var(--alert); }
.tile-label { font-size: 0.88rem; color: var(--ink-soft); font-weight: 700; }
.tile-value { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.15; }
.tile-value.small-value { font-size: 1.3rem; }
.tile-sub { font-size: 0.88rem; color: var(--ink-soft); }

.tag { display: inline-block; margin: 0 0 0.4rem; padding: 0.05rem 0.55rem; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--rule); font-size: 0.8rem; font-weight: 700; }
.tag-new { background: var(--pencil); border-color: var(--pencil); }
.tag-holiday { background: #fbd9d7; border-color: #fbd9d7; color: var(--alert); }
.status { font-size: 0.85rem; font-weight: 700; }
.status-pending { color: #7a5600; }
.status-approved { color: var(--leaf); }

/* Diary */
.diary-date { font-weight: 700; margin-bottom: 0.4rem; }
.diary-facts { list-style: none; padding: 0; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.diary-facts li { padding: 0.2rem 0.65rem; background: var(--paper); border-radius: 999px; font-size: 0.95rem; }
.diary-facts span { color: var(--ink-soft); margin-right: 0.25rem; }
.diary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.diary-card { margin: 0; background: var(--white); border: 2px solid var(--rule); border-radius: 10px; padding: 0.9rem; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
.diary-card legend { font-weight: 700; padding: 0 0.3rem; }
.diary-card label { display: grid; gap: 0.2rem; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.diary-card .full { grid-column: 1 / -1; }
.diary-card select, .diary-card input, .diary-card textarea { font: inherit; font-size: 0.95rem; color: var(--ink); padding: 0.4rem; border: 2px solid var(--rule); border-radius: 8px; background: var(--paper); width: 100%; min-width: 0; }
.sticky-save { position: sticky; bottom: 0; padding: 0.75rem 0; background: linear-gradient(transparent, var(--paper) 35%); margin: 0; }

/* Attendance form */
.att-form { list-style: none; margin: 0 0 1rem; padding: 0; }
.att-form li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap; padding: 0.6rem 0; border-bottom: 1.5px solid var(--rule); }
.att-name { font-weight: 700; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.seg-opt { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.75rem; cursor: pointer; font-weight: 700; font-size: 0.92rem; border-left: 2px solid var(--ink); }
.seg-opt:first-child { border-left: 0; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: -5px; }
.seg-present:has(input:checked) { background: #d7efe3; color: var(--leaf); }
.seg-late:has(input:checked) { background: #fff1c7; color: #7a5600; }
.seg-absent:has(input:checked) { background: #fbd9d7; color: var(--alert); }
.date-pick { display: flex; align-items: center; gap: 0.5rem; }
.date-pick label { font-weight: 700; }

/* Progress entry */
.progress-rows { display: grid; gap: 0.6rem; margin: 1rem 0; }
.progress-row { display: grid; grid-template-columns: 11rem 10rem minmax(0, 1fr); gap: 0.6rem; align-items: center; }
.progress-row label { font-weight: 700; }
.progress-row select, .progress-row input, .form-card .field input[type="text"] { font: inherit; padding: 0.5rem 0.6rem; border: 2px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%; }
.pick-list { list-style: none; padding: 0; margin: 0; }
.pick-list li { padding: 0.55rem 0; border-bottom: 1.5px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.3rem 0.75rem; align-items: center; }
.pick-list a { font-weight: 700; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.photo { margin: 0; background: var(--white); border: 2px solid var(--rule); border-radius: 10px; overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo figcaption { padding: 0.5rem 0.7rem; font-size: 0.92rem; }

/* Messages */
.thread { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; max-height: 32rem; overflow-y: auto; }
.bubble { max-width: 38rem; padding: 0.6rem 0.85rem; border-radius: 12px 12px 12px 4px; background: var(--paper); border: 1.5px solid var(--rule); }
.bubble p { margin: 0; }
.bubble.mine { align-self: flex-end; background: #fff4cf; border-color: #f3dc95; border-radius: 12px 12px 4px 12px; }
.bubble-meta { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.25rem !important; }
.reply { border-top: 2px solid var(--rule); padding-top: 1rem; }

/* People */
.person-grid, .kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.person { display: flex; gap: 0.9rem; align-items: center; background: var(--white); border: 2px solid var(--rule); border-radius: 10px; padding: 0.9rem; }
.person img, .person-initial { width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; flex: none; }
.person-initial { display: grid; place-items: center; background: var(--pencil); font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.person h2 { font-size: 1.1rem; margin: 0; }
.person p { margin: 0.1rem 0; }
.kid { margin-top: 0 !important; }
.kid h2 { font-size: 1.2rem; }
.kid h3 { font-size: 0.95rem; margin-top: 0.8rem; font-family: var(--font-body); }
.alert-line { background: #fdeceb; border-left: 4px solid var(--alert); padding: 0.4rem 0.6rem; border-radius: 4px; }
.pickup-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.pickup-mini li { display: flex; gap: 0.6rem; align-items: center; font-size: 0.92rem; }
.pickup-mini img { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; }

.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 0.9rem; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.link-button.danger { color: var(--alert); }
.danger-zone { margin-top: 1.5rem; }
form.inline { display: inline; margin-left: 0.4rem; }
.btn-small { padding: 0.3rem 0.7rem; font-size: 0.9rem; }
.leave-reply { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.leave-reply input { flex: 1 1 14rem; font: inherit; padding: 0.5rem 0.7rem; border: 2px solid var(--rule); border-radius: 10px; background: var(--paper); }

/* Owner tables and reminders */
.search-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.search-row input { flex: 1 1 16rem; max-width: 26rem; }
.row-warn td { background: #fff8e1; }
.row-alert td { background: #fdeceb; }
.flag { display: inline-block; margin-left: 0.4rem; padding: 0 0.45rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--white); border: 1.5px solid currentColor; color: var(--alert); }
.row-warn .flag { color: #7a5600; }
.row-actions a { margin-left: 0.6rem; font-weight: 700; }
.cell-main { font-weight: 700; }
.reminders { list-style: none; padding: 0; margin: 0; }
.reminders li { padding: 0.55rem 0.7rem; margin-bottom: 0.4rem; border-radius: 8px; border-left: 5px solid; }
.r-warn { background: #fff8e1; border-left-color: var(--pencil-deep) !important; }
.r-alert { background: #fdeceb; border-left-color: var(--alert) !important; }
.bars-col { min-width: 10rem; }
.bar { display: block; height: 0.45rem; border-radius: 999px; margin: 0.15rem 0; max-width: 100%; }
.bar-in, .key-in { background: var(--leaf); }
.bar-out, .key-out { background: var(--margin); }
.key { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; vertical-align: -1px; margin-left: 0.4rem; }

/* Printable report card */
.report-card-page { background: var(--white); }
.report-card { max-width: 52rem; margin: 0 auto; padding: 2rem var(--gutter); }
.rc-head { border-bottom: 4px solid var(--pencil); margin-bottom: 1rem; }
.rc-head .wordmark::after { display: none; }
.rc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.5rem 1.5rem; margin: 0 0 1.5rem; }
.rc-meta dt { font-size: 0.85rem; color: var(--ink-soft); }
.rc-meta dd { margin: 0; font-weight: 700; }
.rc-sign { display: flex; justify-content: space-between; gap: 2rem; margin-top: 4rem; }
.rc-sign p { border-top: 1.5px solid var(--ink); padding-top: 0.4rem; min-width: 14rem; }
@media print {
  .no-print { display: none; }
  .report-card { padding: 0; }
}

/* Portals on tablets and phones: the side menu becomes a scrolling strip */
@media (max-width: 960px) {
  .portal { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 1rem; }
  .portal-side { position: static; padding: 0.75rem; }
  .portal-name { display: none; }
  .portal-nav { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.25rem; margin: 0; scrollbar-width: thin; }
  .portal-nav li { flex: none; }
  .portal-nav a { white-space: nowrap; background: var(--paper); }
  .child-switch { grid-template-columns: auto 1fr; align-items: center; }
  .progress-row { grid-template-columns: 1fr; gap: 0.3rem; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .tile { padding: 0.7rem 0.75rem; }
  .tile-value { font-size: 1.35rem; }
  .diary-card { grid-template-columns: 1fr 1fr; }
  .seg-opt { padding: 0.4rem 0.55rem; }
}


/* ---- Front page polish: photo hero, why-strip ---- */
.carousel-viewport { aspect-ratio: 16 / 7; max-height: 640px; min-height: 22rem; }
.slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(20,28,66,.78) 0%, rgba(20,28,66,.45) 45%, rgba(20,28,66,0) 75%),
              linear-gradient(0deg, rgba(20,28,66,.55) 0%, rgba(20,28,66,0) 40%);
}
.slide figcaption {
  z-index: 2; left: clamp(1.25rem, 6vw, 5rem); bottom: auto; top: 50%; transform: translateY(-65%);
  max-width: min(36rem, calc(100% - 2.5rem)); padding: 0; background: none; border: 0; color: #fff;
  font-size: clamp(1.7rem, 4.4vw, 3.4rem); line-height: 1.1; text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.slide figcaption::after { content: ""; display: block; width: 4.5rem; height: 6px; margin-top: .9rem; border-radius: 3px; background: var(--pencil); }
.hero-actions {
  position: absolute; z-index: 3; left: clamp(1.25rem, 6vw, 5rem); top: calc(50% + 3.6rem);
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.btn-hero {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 800; text-decoration: none;
  font-family: var(--font-display); box-shadow: 0 6px 18px rgba(0,0,0,.28); transition: transform .15s;
}
.btn-hero:hover { transform: translateY(-2px); }
.btn-hero-main { background: var(--pencil); color: var(--ink); }
.btn-hero-alt { background: rgba(255,255,255,.95); color: var(--ink); }
.carousel-btn { border-color: transparent; box-shadow: 0 3px 10px rgba(0,0,0,.25); }

.info-box { border-radius: 18px; overflow: hidden; box-shadow: 0 10px 28px rgba(28,39,84,.12); transition: transform .2s, box-shadow .2s; }
.info-box:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(28,39,84,.18); }
.events { border-radius: 18px; box-shadow: 0 10px 28px rgba(28,39,84,.12); }

.why { background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); padding: 3rem var(--gutter); }
.why-inner { max-width: 76rem; margin: 0 auto; }
.section-title { text-align: center; font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 1.75rem; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.why-card { background: #fff; border-radius: 18px; padding: 1.5rem 1.25rem; text-align: center; box-shadow: 0 10px 28px rgba(28,39,84,.10); border-bottom: 5px solid var(--pencil); }
.why-card:nth-child(2) { border-color: var(--leaf); }
.why-card:nth-child(3) { border-color: var(--margin); }
.why-card:nth-child(4) { border-color: #3b82d6; }
.why-ico { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; margin: 0 auto .75rem; border-radius: 50%; background: var(--paper); font-size: 1.7rem; }
.why-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.why-card p { margin: 0; color: var(--ink-soft); }
.cta-band { background: linear-gradient(100deg, var(--ink), #2b3a85); }

@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .carousel-viewport { aspect-ratio: 4 / 4.2; min-height: 0; max-height: none; }
  .slide figcaption { top: 38%; font-size: 1.7rem; }
  .hero-actions { top: auto; bottom: 3.6rem; left: 1.25rem; right: 1.25rem; }
  .btn-hero { padding: .65rem 1.1rem; font-size: .95rem; }
  .why-grid { grid-template-columns: 1fr; }
}

/* ---- Round 2: top bar, emergency, facts, home inquiry ---- */
.wordmark::after { display: none; }

.contact-bar {
  position: relative;
  background: #26337e;
  border-top: 5px solid var(--pencil);
  padding: 0.55rem var(--gutter) 0.85rem;
  margin-bottom: 10px;
  z-index: 5;
}
.contact-bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; pointer-events: none;
  background: radial-gradient(circle at 10px 0, #26337e 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x;
}
.contact-pills { display: flex; gap: 0.5rem; align-items: center; margin-left: auto; margin-right: 0.5rem; }
.pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.95rem; border-radius: 999px; font-weight: 800; font-family: var(--font-display); text-decoration: none; font-size: 0.9rem; }
.contact-bar a.pill-alert { background: #e2464f; color: #fff; }
.contact-bar a.pill-alert:hover { background: #c5333c; color: #fff; }
.contact-bar a.pill-sun { background: var(--pencil); color: var(--ink); }
.contact-bar a.pill-sun:hover { background: #fff; color: var(--ink); }
.pill .icon { width: 1rem; height: 1rem; }

/* Emergency tab in the main menu */
.nav-item:last-child > .nav-link[href="/emergency/"] { color: #e2464f; font-weight: 800; }

.emergency h2 { margin-top: 1.5rem; }
.emerg-grid { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.85rem; }
.emerg { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1.1rem; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(28, 39, 84, .12); border-left: 8px solid var(--leaf); }
.emerg-red { border-left-color: #e2464f; }
.emerg-school { border-left-color: var(--pencil-deep); }
.emerg-name { font-weight: 700; color: var(--ink-soft); }
.emerg-num { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; text-decoration: none; color: var(--ink); }

.prose-list { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.prose-list li { margin-bottom: 0.4rem; }

.home-facts { background: var(--pencil); padding: .85rem var(--gutter); }
.home-facts-inner { max-width: 76rem; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: .4rem 1.25rem; flex-wrap: wrap; }
.fact { margin: 0; color: var(--ink); font-weight: 600; font-size: clamp(1rem, 1.8vw, 1.2rem); white-space: nowrap; }
.fact strong { font-family: var(--font-display); font-size: clamp(1.1rem, 2vw, 1.4rem); margin-right: .25rem; }

.home-inquire { background: linear-gradient(120deg, #26337e, #3a4fb5); color: #fff; padding: 3rem var(--gutter); }
.hi-inner { max-width: 76rem; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.hi-copy h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.hi-copy p { color: #e8edff; }
.hi-contact { list-style: none; padding: 0; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.hi-contact a { display: inline-block; padding: 0.4rem 1rem; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; text-decoration: none; }
.hi-contact a:hover { background: var(--pencil); color: var(--ink); }
.hi-form { background: #fff; color: var(--ink); border-radius: 20px; padding: 1.5rem; box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.hi-form .field { margin-bottom: 0.8rem; }
.hi-form input, .hi-form textarea { width: 100%; }

@media (max-width: 760px) {
  .contact-pills { margin-left: 0; }
  .fact { white-space: normal; font-size: .95rem; }
  .hi-inner { grid-template-columns: 1fr; }
}

/* ---- Round 3: one-row header, no ruled lines, livelier page heads ---- */

/* Logo, menu and Parents login share one row, like a modern school site. */
.mainbar {
  position: relative; z-index: 30;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 1.25rem;
  padding: 0.35rem var(--gutter) 0.45rem;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(28, 39, 84, 0.10);
}
.mainbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; pointer-events: none;
  background: radial-gradient(circle at 10px 0, #fff 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x;
}
.mainbar .topbar { display: contents; }
.mainbar .wordmark { order: 1; font-size: 1.55rem; padding: 0.35rem 0; }
.mainbar .site-nav { order: 2; flex: 1 1 auto; border: 0; padding: 0; background: none; }
.mainbar .topbar-actions { order: 3; margin-left: auto; }
.nav-list { justify-content: center; }
.nav-link { padding: 0.65rem 0.7rem; }
/* Portals (signed in) have no menu: keep the old simple bar */
.mainbar:not(:has(.site-nav)) { justify-content: space-between; }

/* Remove the notebook's ruled lines and red margin everywhere */
.notebook { background-image: none; }
.notebook::before { display: none; }
.notebook-inner { padding-left: var(--gutter); max-width: 76rem; margin: 0 auto; }
.topbar, .site-nav { border-bottom: 0; }
.band-soft { border-top: 0; }

/* Page headings and the no-photo welcome: a bold gradient with soft shapes */
.page-head, .hero.notebook {
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 200, 61, .55) 0 7rem, transparent 7.1rem),
    radial-gradient(circle at 96% 95%, rgba(255, 255, 255, .16) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 70% 110%, rgba(226, 70, 79, .35) 0 8rem, transparent 8.1rem),
    linear-gradient(120deg, #26337e 0%, #3a58c4 60%, #4a8be0 100%);
  padding-top: 3.25rem; padding-bottom: 3.25rem;
  margin-top: 10px;
}
.page-head h1, .hero.notebook .hero-title, .page-head .page-intro, .hero-lede { color: #fff; }
.page-head .page-intro { line-height: 1.5; font-size: 1.2rem; opacity: .95; }
.page-head h1::after { content: ""; display: block; width: 4.5rem; height: 6px; margin-top: .8rem; border-radius: 3px; background: var(--pencil); }

/* Sign-in pages: soft colour instead of lined paper */
.login-wrap { background: linear-gradient(160deg, #e9f0ff 0%, #fff6dc 100%); }

/* Cards: softer, no heavy ink outlines on the public site */
.cta-aside { border: 0; border-radius: 18px; box-shadow: 0 12px 30px rgba(28, 39, 84, .14); border-top: 6px solid var(--pencil); }
.prose-img { border: 0; border-radius: 18px; box-shadow: 0 12px 30px rgba(28, 39, 84, .14); }
.prose h2 { color: #26337e; }
.review, .form-card { border: 0; box-shadow: 0 10px 28px rgba(28, 39, 84, .10); border-radius: 18px; }
.dropdown { border: 0; border-radius: 14px; box-shadow: 0 16px 36px rgba(28, 39, 84, .22); border-top: 4px solid var(--pencil); }
.dropdown a:hover { background: var(--paper); }
.events { border: 0; }
.info-box { border: 0; border-top-width: 8px; }
.info-box-img { border-bottom: 0; }

@media (max-width: 1100px) { .nav-link { padding: 0.65rem 0.45rem; font-size: 0.95rem; } .mainbar .wordmark { font-size: 1.3rem; } }
@media (max-width: 760px) {
  .mainbar { justify-content: space-between; }
  .mainbar .site-nav { order: 3; flex-basis: 100%; }
  .mainbar .topbar-actions { order: 2; margin-left: 0; }
  .page-head, .hero.notebook { padding-top: 2.25rem; padding-bottom: 2.25rem; }
}

/* keep logo, menu and Parents login on one row */
.mainbar .site-nav { flex: 1 1 0; min-width: 0; }
.mainbar .wordmark { font-size: 1.4rem; white-space: nowrap; }
.mainbar .nav-list { flex-wrap: nowrap; }
.mainbar .nav-link { padding: 0.65rem 0.5rem; font-size: 0.97rem; white-space: nowrap; }
.mainbar .topbar-actions { flex: none; }
.page-head, .hero.notebook { background:
    radial-gradient(circle at 88% 20%, rgba(255, 200, 61, .35) 0 7rem, transparent 7.1rem),
    radial-gradient(circle at 96% 95%, rgba(255, 255, 255, .16) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 70% 110%, rgba(226, 70, 79, .25) 0 8rem, transparent 8.1rem),
    linear-gradient(120deg, #26337e 0%, #3a58c4 60%, #4a8be0 100%); }
@media (max-width: 1000px) and (min-width: 761px) {
  .mainbar .nav-list { flex-wrap: wrap; }
  .mainbar .nav-link { padding: 0.5rem 0.4rem; font-size: 0.9rem; }
}
@media (max-width: 760px) { .mainbar .nav-list { flex-wrap: wrap; } .mainbar .site-nav { flex-basis: 100%; } }

@media (max-width: 1180px) and (min-width: 761px) {
  .mainbar .site-nav { order: 3; flex: 1 0 100%; }
  .mainbar .nav-list { flex-wrap: wrap; }
  .mainbar .nav-link { font-size: 0.97rem; padding: 0.5rem 0.55rem; }
}
.page-head, .hero.notebook { background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, .12) 0 7rem, transparent 7.1rem),
    radial-gradient(circle at 96% 95%, rgba(255, 200, 61, .20) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 70% 110%, rgba(255, 255, 255, .10) 0 8rem, transparent 8.1rem),
    linear-gradient(120deg, #26337e 0%, #3a58c4 60%, #4a8be0 100%); }

/* ---- Round 4: richer content pages, motion, floating buttons ---- */
.mainbar { position: sticky; top: 0; }
.btn-ghost { display: inline-block; padding: 0.7rem 1.3rem; border-radius: 999px; border: 2px solid rgba(255,255,255,.7); color: #fff; font-weight: 800; font-family: var(--font-display); text-decoration: none; }
.btn-ghost:hover { background: #fff; color: var(--ink); }

.page-jump { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; max-width: 72rem; margin: 1.25rem auto 0; padding: 0 var(--gutter); }
.page-jump a { padding: .4rem 1rem; border-radius: 999px; background: #fff; box-shadow: 0 4px 12px rgba(28,39,84,.10); font-weight: 700; text-decoration: none; color: #26337e; font-size: .95rem; }
.page-jump a:hover { background: var(--pencil); color: var(--ink); }
.page-photo { max-width: 72rem; margin: 1.5rem auto 0; padding: 0 var(--gutter); }
.page-photo img { width: 100%; max-height: 26rem; object-fit: cover; border-radius: 22px; box-shadow: 0 16px 40px rgba(28,39,84,.18); display: block; }

.sec { padding: 3rem var(--gutter); scroll-margin-top: 5rem; }
.sec-alt { background: #fff; }
.sec-inner { max-width: 72rem; margin: 0 auto; }
.sec-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: #26337e; margin-bottom: 1rem; }
.sec-title::after { content: ""; display: block; width: 3.5rem; height: 5px; margin-top: .5rem; border-radius: 3px; background: var(--pencil); }
.sec-text { max-width: 62rem; font-size: 1.12rem; }

.tick-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .75rem 1.5rem; }
.tick-list li { position: relative; padding-left: 2rem; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--leaf); color: #fff; font-size: .85rem; font-weight: 800; line-height: 1; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; margin: 1.25rem 0; }
.feat { position: relative; background: #fff; border-radius: 20px; padding: 1.6rem 1.35rem 1.4rem; box-shadow: 0 12px 30px rgba(28,39,84,.12); border-top: 6px solid var(--pencil); transition: transform .25s, box-shadow .25s; }
.sec-alt .feat { background: var(--paper); }
.feat:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(28,39,84,.18); }
.feat:nth-child(4n+2) { border-top-color: var(--leaf); }
.feat:nth-child(4n+3) { border-top-color: var(--margin); }
.feat:nth-child(4n+4) { border-top-color: #3b82d6; }
.feat-num { position: absolute; top: -1.1rem; right: 1rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: #26337e; color: #fff; font-family: var(--font-display); font-weight: 800; }
.feat h3 { font-size: 1.25rem; margin-bottom: .4rem; color: #26337e; }
.feat p { margin: 0; color: var(--ink-soft); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.25rem 0; display: grid; gap: 1rem; max-width: 52rem; position: relative; }
.steps li { counter-increment: step; position: relative; padding: .9rem 1.2rem .9rem 4.2rem; background: #fff; border-radius: 16px; box-shadow: 0 8px 22px rgba(28,39,84,.10); }
.sec-alt .steps li { background: var(--paper); }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; background: var(--pencil); color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 2.05rem; top: calc(50% + 1.2rem); height: calc(100% - 1.4rem + 1rem); width: 2px; background: repeating-linear-gradient(to bottom, #b9c6ea 0 4px, transparent 4px 8px); }

.faq { max-width: 52rem; display: grid; gap: .75rem; margin: 1rem 0; }
.faq-item { background: #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(28,39,84,.10); overflow: hidden; }
.sec-alt .faq-item { background: var(--paper); }
.faq-item summary { cursor: pointer; padding: 1rem 3rem 1rem 1.25rem; font-weight: 800; position: relative; list-style: none; color: #26337e; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; transition: transform .2s; color: var(--margin); }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { margin: 0; padding: 0 1.25rem 1.1rem; color: var(--ink-soft); }

.join-band { background: linear-gradient(120deg, #26337e, #3a58c4); color: #fff; padding: 2.75rem var(--gutter); }
.join-inner { max-width: 72rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.join-inner h2 { color: #fff; margin-bottom: .25rem; }
.join-inner p { margin: 0; color: #e8edff; }
.join-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.float-wa { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.float-wa svg { width: 1.9rem; height: 1.9rem; fill: #fff; }
.float-wa::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; opacity: .5; animation: wa-pulse 2.4s infinite; z-index: -1; }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.7); opacity: 0; } }

/* Scroll reveal and hero motion (switched on by site.js, off for reduced motion) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .card-grid .feat, .js .steps li { opacity: 0; transform: translateY(20px); transition: opacity .6s ease calc(var(--i, 0) * 90ms), transform .6s ease calc(var(--i, 0) * 90ms), box-shadow .25s; }
.js .reveal.in .feat, .js .reveal.in .steps li { opacity: 1; transform: none; }
.js .reveal.in .feat:hover { transform: translateY(-6px); }
.slide.is-active img { animation: slow-zoom 9s ease-out both; }
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.07); } }
.slide.is-active figcaption { animation: rise .8s ease both .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(calc(-65% + 24px)); } to { opacity: 1; transform: translateY(-65%); } }
.mainbar.is-stuck { box-shadow: 0 8px 24px rgba(28,39,84,.18); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .card-grid .feat, .js .steps li { opacity: 1 !important; transform: none !important; transition: none !important; }
  .slide.is-active img, .slide.is-active figcaption, .float-wa::before { animation: none !important; }
}
@media (max-width: 640px) { .sec { padding: 2.25rem var(--gutter); } .join-actions .btn, .join-actions .btn-ghost { flex: 1 1 100%; text-align: center; } }

/* ---- Owner business hub ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.filter-bar label { display: flex; flex-direction: column; gap: .2rem; font-weight: 700; font-size: .9rem; }
.filter-bar select, .filter-bar input { font: inherit; padding: .45rem .6rem; border: 2px solid var(--rule); border-radius: 8px; background: #fff; min-width: 9rem; }
.wide-text { width: 100%; font: inherit; padding: .7rem; border: 2px solid var(--rule); border-radius: 10px; }
.composer-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.live-card { background: var(--paper); border-radius: 14px; padding: 1rem 1.1rem; border-left: 6px solid var(--leaf); }
.live-card h3 { margin-bottom: .2rem; }
.live-links { margin-top: .5rem; }
.inline-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.invoice { background: #fff; border: 2px solid var(--rule); border-radius: 12px; padding: 2rem; max-width: 46rem; margin: 1rem 0; }
.invoice-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; border-bottom: 3px solid var(--pencil); padding-bottom: 1rem; margin-bottom: 1rem; }
.invoice-title { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: #26337e; margin: 0; }
.invoice-no { text-align: right; }
.invoice-bill { margin-bottom: 1rem; }
.invoice-status { margin-top: 1.25rem; font-weight: 700; }
@media print {
  .contact-bar, .mainbar, .portal-side, .footer, .float-wa, .no-print, .title-row { display: none !important; }
  .portal { display: block; }
  .invoice { border: 0; padding: 0; max-width: none; }
  body { background: #fff; }
}

/* ---- Age group cards (home page) ---- */
.prog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prog-card { background: #fff; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 10px 28px rgba(28,39,84,.12); transition: transform .2s, box-shadow .2s; border-top: 8px solid var(--pencil); }
.prog-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(28,39,84,.18); }
.prog-1 { border-top-color: #f2a900; } .prog-2 { border-top-color: #37a35c; }
.prog-3 { border-top-color: #2f6fd0; } .prog-4 { border-top-color: #e2464f; }
.prog-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eef3ff; }
.prog-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.prog-card:hover .prog-photo img { transform: scale(1.05); }
.prog-body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.prog-body h2 { font-size: 1.35rem; margin: .15rem 0 .4rem; }
.prog-body p { margin-bottom: .75rem; }
.prog-age { align-self: flex-start; font-size: .8rem; font-weight: 800; padding: .15rem .7rem; border-radius: 999px; background: #fff3c4; color: #7a5a00; }
@media (max-width: 520px) { .prog-grid { grid-template-columns: 1fr; } }

/* ---- Scrolling reviews ---- */
.rv-marquee { overflow: hidden; margin: 0 -1rem; padding: .5rem 0 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.rv-track { display: flex; width: max-content; }
.rv-set { display: flex; gap: 1.25rem; padding-right: 1.25rem; }
.rv-item { width: min(21rem, 80vw); display: flex; }
.rv-item .review { width: 100%; border-radius: 18px; border: 0; box-shadow: 0 8px 22px rgba(28,39,84,.12); }
.rv-marquee { overflow-x: auto; scrollbar-width: none; }
.rv-marquee::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .rv-marquee { overflow: hidden; }
  .rv-track { animation: rv-roll calc(var(--rv-seconds) * 8s) linear infinite; }
  .rv-marquee:hover .rv-track, .rv-marquee:focus-within .rv-track { animation-play-state: paused; }
}
@keyframes rv-roll { to { transform: translateX(-50%); } }

/* ---- Shared board, avatars, gallery ---- */
.note-form { display: grid; gap: .5rem; margin: .5rem 0 1rem; }
.note-form input, .note-form textarea { width: 100%; }
.note-list li.is-done { opacity: .55; }
.note-list .inline-form { display: inline; margin: 0 0 0 .5rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--link, #2f6fd0); text-decoration: underline; cursor: pointer; font: inherit; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #e8eefc; flex: none; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-row { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #e6e9f2; flex-wrap: wrap; }
.avatar-row form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.gallery-filter { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.gallery-grid { columns: 3 15rem; column-gap: 1rem; }
.gallery-item { break-inside: avoid; margin: 0 0 1rem; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 8px 22px rgba(28,39,84,.12); }
.gallery-item img { width: 100%; display: block; }
.gallery-item figcaption { padding: .6rem .9rem .8rem; font-size: .95rem; }
.moments-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.moments-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; }
.chip { display: inline-block; padding: .35rem .95rem; border-radius: 999px; background: #eef3ff; color: #1c2754; font-weight: 700; text-decoration: none; }
.chip.is-on, .chip:hover { background: #1c2754; color: #fff; }
.avatar-sm { width: 28px; height: 28px; vertical-align: middle; margin-right: .4rem; }

.who-card { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; margin: 0 0 1rem; border-radius: 14px; background: #eef3ff; color: inherit; text-decoration: none; }
.avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: #ffe08a; color: #1c2754; font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.avatar-lg.avatar-empty { font-size: 2.2rem; }
.avatar-sm-block { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.child-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.child-head h1, .child-head h2 { margin: 0; }
.child-head-sm { margin-bottom: .5rem; }
.pickup-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; list-style: none; padding: 0; margin: .5rem 0; }
.pickup-wide li { display: flex; align-items: center; gap: .7rem; }
.pickup-wide img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }

.wx { margin: 0; font-size: .85rem; font-weight: 700; color: #fff; white-space: nowrap; }
@media (max-width: 700px) { .wx { flex-basis: 100%; white-space: normal; text-align: center; } }
.notice-line { background: #fff7d6; border-left: 5px solid #f2b705; padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1.25rem; }

/* ---- Inbox pages and pick & drop list ---- */
.inbox-item.is-alert { border-left: 6px solid #e2464f; }
.inbox-item .inline-form { margin: .5rem 0 0; }
.inbox-item .inline-form input[type=text] { flex: 1 1 14rem; }
.pickup-row { display: flex; gap: 1.25rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid #e6e9f2; flex-wrap: wrap; }
.pickup-child { display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 8.5rem; text-align: center; }
.pickup-people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; flex: 1; }
.pickup-people li { display: flex; align-items: center; gap: .6rem; min-width: 14rem; }

/* ---- Control room ---- */
.alert-stack { display: grid; gap: .6rem; margin: 1rem 0 1.5rem; }
.alert-card { display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; border-radius: 14px; text-decoration: none; color: inherit; border-left: 8px solid; background: #fff; box-shadow: 0 6px 18px rgba(28,39,84,.1); }
.alert-red { border-color: #e2464f; background: #fff1f1; } .alert-amber { border-color: #f2a900; background: #fff8e1; }
.alert-blue { border-color: #2f6fd0; background: #eef4ff; } .alert-green { border-color: #37a35c; background: #eaf7ee; }
.flag { padding: .5rem .8rem; border-radius: 10px; font-weight: 700; }
.flag-up { background: #eaf7ee; color: #1c6b3a; } .flag-down { background: #fff1f1; color: #a42a31; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: .75rem 0 1rem; }
.spark span { flex: 1; background: #2f6fd0; border-radius: 3px 3px 0 0; min-height: 2px; }
.issue-list li { margin: .2rem 0; }

.pw-rules{font-size:.85rem;margin:.4rem 0 0;padding-left:1.1rem}
.pw-rules li{margin:.1rem 0}

/* Keep the top bar one slim row on laptops: tighter gaps, smaller weather text. */
@media (min-width: 701px) {
  .contact-bar { flex-wrap: nowrap; gap: 0.5rem 1rem; font-size: 0.85rem; }
  .contact-list { flex-wrap: nowrap; gap: 0.25rem 1rem; }
  .contact-list .contact-text, .wx { white-space: nowrap; }
  .wx { font-size: 0.8rem; margin-left: auto; }
  .contact-pills { margin-left: 0; margin-right: 0; }
  .social-list { gap: 0; flex: none; }
  .social-list a { width: 1.8rem; height: 1.8rem; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .contact-bar { flex-wrap: wrap; }
}

/* Colourful social icons: brand-coloured round badges with a white symbol. */
.contact-bar .social-list { gap: 0.4rem; }
.contact-bar .social-list a.soc { width: 1.9rem; height: 1.9rem; border-radius: 50%; color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.18); transition: transform .15s ease; }
.contact-bar .social-list a.soc:hover { transform: translateY(-2px) scale(1.06); color: #fff; background-clip: border-box; }
.contact-bar .social-list a.soc .icon { width: 1.05rem; height: 1.05rem; }
.contact-bar .social-list a.soc-wa { background: #25d366; }
.contact-bar .social-list a.soc-wa:hover { background: #1fb957; }
.contact-bar .social-list a.soc-fb { background: #1877f2; }
.contact-bar .social-list a.soc-fb:hover { background: #135fc4; }
.contact-bar .social-list a.soc-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.contact-bar .social-list a.soc-yt { background: #ff0000; }
.contact-bar .social-list a.soc-yt:hover { background: #cc0000; }
@media (min-width: 701px) { .contact-bar .social-list a.soc { width: 1.8rem; height: 1.8rem; } }

/* Phone and email icons as coloured badges so they look tappable. */
.contact-bar a.cta-link .icon {
  width: 1.9rem; height: 1.9rem; padding: 0.42rem; border-radius: 50%;
  stroke: #fff; stroke-width: 2; box-shadow: 0 1px 0 rgba(0,0,0,.18);
}
.contact-bar a.cta-phone .icon { background: #25d366; }
.contact-bar a.cta-mail .icon { background: #ff9f1c; }
.contact-bar a.cta-link { font-weight: 700; }
.contact-bar a.cta-link:hover .icon { transform: scale(1.08); }
.contact-bar a.cta-link:hover .contact-text { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .contact-bar a.cta-phone .icon { animation: ring 3.2s ease-in-out infinite; transform-origin: 50% 50%; }
  @keyframes ring {
    0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); transform: rotate(0); }
    74% { transform: rotate(-14deg); }
    78% { transform: rotate(12deg); box-shadow: 0 0 0 6px rgba(37,211,102,.25); }
    82% { transform: rotate(-9deg); }
    86% { transform: rotate(6deg); box-shadow: 0 0 0 10px rgba(37,211,102,0); }
    90% { transform: rotate(0); }
  }
}
@media (min-width: 701px) { .contact-bar a.cta-link .icon { width: 1.8rem; height: 1.8rem; padding: 0.4rem; } }
