/* about.css — scoped to about-cpac.html (loads after index.css) */

/* ---------- Sticky "On this page" bar ---------- */
.onpage {
  position: sticky;
  top: var(--nav-h, 86px);
  z-index: 150;
  width: 100%;
  background: rgba(247, 250, 252, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--section-border, rgba(26, 42, 74, 0.1));
  box-shadow: 0 4px 14px rgba(12, 30, 66, 0.06);
}
.onpage-inner {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.onpage-inner::-webkit-scrollbar { display: none; }
.onpage-label {
  flex: 0 0 auto;
  margin-right: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--section-muted, #64748b);
}
.onpage a {
  flex: 0 0 auto;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  color: var(--section-heading, #0c1e42);
  transition: background .15s ease, color .15s ease;
}
.onpage a:hover { background: var(--yellow-dim, rgba(245, 194, 0, 0.12)); }
.onpage a:focus-visible { outline: 2px solid #C9902A; outline-offset: 2px; }
.onpage a.is-active { background: #F5C200; color: #0c1e42; }
[data-theme="dark"] .onpage {
  background: rgba(8, 20, 36, 0.94);
  border-bottom-color: rgba(245, 194, 0, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .onpage a { color: #e4ecf5; }
[data-theme="dark"] .onpage a:hover { background: rgba(245, 194, 0, 0.16); }
[data-theme="dark"] .onpage a.is-active { background: #F5C200; color: #0c1e42; }
[data-theme="dark"] .onpage-label { color: rgba(232, 238, 245, 0.7); }

/* Anchored sections land below BOTH the site menu and this bar */
#history, #seal, #song, #objectives, #core-values, #outcomes, #campus, #blueprint,
#identity {
  scroll-margin-top: calc(var(--nav-h, 86px) + 4.2rem);
}

/* ---------- History: collapsible timeline ---------- */
#history .history-more { display: flex; justify-content: center; margin: 1.4rem 0 0; }
.history-toggle {
  padding: 0.8rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: #F5C200;
  color: #0c1e42;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.history-toggle:hover { background: #ffd84a; transform: translateY(-2px); }
.history-toggle:focus-visible { outline: 3px solid #0c1e42; outline-offset: 3px; }
[data-theme="dark"] .history-toggle:focus-visible { outline-color: #fff; }
.history-collapsible.is-collapsed .history-list li:nth-child(n+4) { display: none; }
.history-collapsible.is-collapsed .history-note { display: none; }
.history-collapsible.is-collapsed .history-list::after {
  content: "";
  position: absolute;
  left: -1rem; right: -1rem; bottom: 0;
  height: 130px;
  background: linear-gradient(to bottom, transparent, var(--bg-blueprint, #f7fafc));
  pointer-events: none;
}

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
  .onpage-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .history-toggle, .onpage a { transition: none; }
  .history-toggle:hover { transform: none; }
}

/* Fit the chips: hide the caption below desktop widths */
@media (max-width: 1200px) { .onpage-label { display: none; } }

/* Page title above the slideshow */
.about-head { width: 100%; margin: 0; padding: 2.2rem 1rem 1.4rem; }
