/* ============================================================
   pages.css — open-page compositions
   Composes core tokens and components. Defines no colours.
   ============================================================ */

/* ── Page hero: the standard band on every open page ─────── */
.c-page-hero {
  padding-block: var(--s-12) var(--s-10);
  background:
    radial-gradient(ellipse at 15% 0%, color-mix(in srgb, var(--exam-soft, var(--brand-100)) 75%, transparent), transparent 60%),
    var(--bg2);
  border-bottom: 1px solid var(--border);
}
.c-page-hero--compact { padding-block: var(--s-8) var(--s-8); }
.c-page-hero__eyebrow { color: var(--exam-accent, var(--brand-600)); }
.c-page-hero__title   { max-width: 22ch; margin-top: var(--s-2); }
.c-page-hero__lead    { max-width: 60ch; margin-top: var(--s-4); }

/* ── Sticky sub-navigation on long hub pages ─────────────── */
.c-subnav-bar {
  position: sticky; top: var(--header-h); z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.c-subnav-bar__inner {
  display: flex; gap: var(--s-1);
  overflow-x: auto; scrollbar-width: none;
  padding-block: var(--s-2);
}
.c-subnav-bar__inner::-webkit-scrollbar { display: none; }
.c-subnav-bar a {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  font-family: var(--ff-heading);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: var(--muted); white-space: nowrap;
}
.c-subnav-bar a:hover { color: var(--exam-accent, var(--brand-600)); background: var(--bg2); }

/* ── Exam hub editorial block ────────────────────────────── */
.c-hub-block { scroll-margin-top: calc(var(--header-h) + var(--s-12)); }

/* ── Filter bar ──────────────────────────────────────────── */
.c-filter-bar {
  display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end;
  padding: var(--s-4) var(--s-5);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-8);
}
.c-filter-bar .c-field { margin: 0; min-width: 150px; flex: 1 1 150px; }
.c-filter-bar__search { flex: 2 1 240px; }
.c-filter-bar__actions { display: flex; gap: var(--s-2); margin-left: auto; }

/* ── Subject card ────────────────────────────────────────── */
.c-subject-card__mark {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--brand-100); color: var(--brand-700);
  font-family: var(--ff-heading); font-weight: var(--fw-extra);
  font-size: var(--fs-sm); letter-spacing: var(--tracking-wide);
}

/* ── Material card ───────────────────────────────────────── */
.c-res-card { border-top: 3px solid var(--exam-accent, var(--border)); }
.c-res-card__link { display: block; flex: 1; }
.c-res-card__type {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--exam-accent, var(--brand-600));
}

/* ── Teacher list row ────────────────────────────────────── */
.c-teacher-row__link { display: flex; gap: var(--s-4); padding: var(--s-5); align-items: flex-start; }
.c-teacher-row__body { display: flex; flex-direction: column; min-width: 0; }
.c-teacher-row__name { color: var(--text); }

/* Portrait placeholder until real photos arrive (decision D3) */
.c-portrait--placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--brand-100) 80%, transparent), transparent 70%),
    var(--bg3);
}

/* ── Faculty profile hero ────────────────────────────────── */
.c-profile-hero {
  padding-block: var(--s-10) var(--s-12);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.c-profile-hero__grid { display: grid; gap: var(--s-8); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 768px) { .c-profile-hero__grid { grid-template-columns: 200px minmax(0, 1fr); } }
.c-profile-hero__photo { border-radius: var(--r-lg); }

/* ── Team card ───────────────────────────────────────────── */
.c-team-card { text-align: center; }
.c-team-card .c-card__body { display: flex; flex-direction: column; align-items: center; }
.c-team-card__social { border-color: var(--border-strong); color: var(--muted); }
.c-team-card__social:hover { border-color: var(--brand-500); color: var(--brand-600); }

/* ── Definition list used on detail sidebars ─────────────── */
.c-detail-list { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); margin: 0; font-size: var(--fs-sm); }
.c-detail-list dt { color: var(--muted); }
.c-detail-list dd { margin: 0; color: var(--text); text-align: right; }

/* ── Rule list (quiz instructions, achievements) ─────────── */
.c-rule-list { list-style: none; margin: 0; padding: 0; }
.c-rule-list li {
  position: relative;
  padding-left: var(--s-6);
  font-size: var(--fs-sm); color: var(--text-2);
  line-height: var(--lh-prose);
}
.c-rule-list li + li { margin-top: var(--s-3); }
.c-rule-list li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 6px; height: 6px; border-radius: var(--r-full);
  background: var(--exam-accent, var(--brand-500));
}

/* ── Placeholder where a viewer will mount (M4) ──────────── */
.c-viewer-placeholder {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s-16) var(--s-6);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--bg2);
  color: var(--muted);
}

/* ── Syllabus tree additions ─────────────────────────────── */
.c-tree__icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted-2); }
.c-tree__row[role="button"] { cursor: pointer; }
.c-tree__meta { display: inline-flex; align-items: center; gap: var(--s-3); }

/* ── Honeypot: present in the DOM, invisible to people ───── */
.c-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ── Pagination from Laravel's default paginator ─────────── */
.pagination { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: 0; }
.pagination .page-link,
.pagination .page-item span,
.pagination .page-item a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding-inline: var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card-bg);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.pagination .page-item.active span { background: var(--brand-600); border-color: var(--brand-600); color: var(--on-brand); }
.pagination .page-item.disabled span { opacity: .45; }

/* ════════════════════════════════════════════════════════════
   STANDING DOCUMENT  (about, privacy, terms, refunds)
   ------------------------------------------------------------
   A contents rail beside long-form copy. Legal pages are close
   to unreadable without one, and the rail is the difference
   between a policy people can check and a wall they scroll past.
   ════════════════════════════════════════════════════════════ */
.p-doc { display: grid; gap: var(--s-10); grid-template-columns: 1fr; }
@media (min-width: 1024px) { .p-doc { grid-template-columns: 220px 1fr; gap: var(--s-12); } }

.p-doc__rail { display: none; }
@media (min-width: 1024px) { .p-doc__rail { display: block; } }
.p-doc__toc { list-style: none; padding: 0; margin: 0; font-size: var(--fs-sm); }
.p-doc__toc li + li { margin-top: var(--s-2); }
.p-doc__toc a { color: var(--muted); display: block; line-height: 1.4; }
.p-doc__toc a:hover { color: var(--brand-600); }

.p-doc__body { min-width: 0; max-width: var(--container-prose); }
.p-doc__section + .p-doc__section { margin-top: var(--s-10); }
.p-doc__section { scroll-margin-top: calc(var(--header-h) + var(--s-6)); }
