/* UniHive school pages (schools/<name>.html, written by tools/build-schools.js).
   Needs css/styles.css (colours, header, footer, buttons, chips) and css/session.css.
   Every class here starts with "sp-" so it can never clash with the shared styles. */

.nl[aria-current="page"] { color: var(--text); font-weight: 700; }
.chip-s[hidden] { display: none; }

.sp { padding-top: 8px; padding-bottom: 72px; }

.sp-crumbs { color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.sp-crumbs a { color: var(--muted); text-decoration: none; }
.sp-crumbs a:hover { color: var(--text); text-decoration: underline; }
.sp-crumbs [aria-current] { color: var(--text); }

/* ---------- Top card ---------- */
.sp-hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px;
  margin-top: 20px; padding: clamp(24px, 4vw, 48px);
}
.sp-hero-copy { flex: 1 1 420px; min-width: 0; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-title {
  margin: 18px 0 0; font-weight: 800; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.04;
  letter-spacing: -.03em; overflow-wrap: anywhere;
}
.sp-lead { margin: 14px 0 0; max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.sp-hero-actions { flex: 0 1 300px; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 300px; }
.sp-hero-actions .btn, .sp-hero-actions .ghost { width: 100%; text-align: center; overflow-wrap: anywhere; }
.sp-follow { gap: 8px; border: 0; cursor: pointer; font-family: var(--font); }
.sp-follow[aria-pressed="true"] { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.sp-follow[aria-pressed="true"]:hover { background: #D5EBDD; box-shadow: none; }
.sp-follow:disabled { opacity: .65; cursor: progress; transform: none; }
.sp-follow svg { flex: 0 0 auto; }
.sp-note { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.sp-status { margin: 0; color: var(--ok); font-size: 14px; font-weight: 600; line-height: 1.45; text-align: center; }
.sp-status.err { color: var(--err); }
.sp-status:empty { display: none; }

/* ---------- Columns ---------- */
.sp-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; margin-top: 32px; }
.sp-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.sp-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.sp-card { padding: 36px; }
.sp-small { padding: 30px; }
.sp-h2 { margin: 0; max-width: none; font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.sp-h3 { margin: 0; font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.sp-fine { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ---------- Latest updates ---------- */
.sp-updates { display: flex; flex-direction: column; gap: 26px; margin-top: 28px; }
.sp-updates:empty { display: none; }
.sp-update { display: flex; gap: 18px; }
.sp-dot { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 7px; border-radius: 50%; background: var(--amber); }
.sp-tag { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sp-sum { margin: 6px 0 0; color: var(--text); font-size: 18px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.sp-more { display: inline-flex; align-items: center; min-height: 44px; color: var(--ok); font-size: 15px; font-weight: 700; text-decoration: none; }
.sp-more:hover { text-decoration: underline; }
.sp-empty { margin: 20px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.sp-updates:not(:empty) + .sp-empty { padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- About ---------- */
.sp-about { margin: 16px 0 0; }
.sp-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 500; }
.sp-row:last-child { border-bottom: 0; }
.sp-row dt { color: var(--muted); }
.sp-row dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.sp-row a { color: var(--ok); font-weight: 700; }

/* ---------- Questions ---------- */
.sp-faq { display: flex; flex-direction: column; gap: 22px; margin-top: 24px; }
.sp-faq h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; }
.sp-faq p { margin: 8px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* ---------- Sidebar ---------- */
.sp-join { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.sp-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sp-join input {
  width: 100%; min-height: 52px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text); font: 500 16px var(--font);
}
.sp-join input:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.sp-join input[aria-invalid="true"] { border-color: var(--err); }
.sp-join .btn { width: 100%; margin-top: 6px; border: 0; cursor: pointer; font-family: var(--font); }
.sp-links { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.sp-link { width: 100%; justify-content: flex-start; margin-top: 18px; text-align: left; overflow-wrap: anywhere; }
.sp-links .sp-link { margin-top: 0; }

/* ---------- Other schools ---------- */
.sp-related { margin-top: 64px; }
.sp-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.sp-rel {
  display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 18px; height: 100%;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.sp-rel:hover { transform: translateY(-3px); border-color: var(--amber); }
.sp-logo { display: inline-flex; flex: 0 0 auto; }
.sp-rel-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-rel-text strong { font-size: 20px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.sp-rel-text span { color: var(--muted); font-size: 14px; line-height: 1.35; }

/* ---------- Follow confirmation ---------- */
.sp-dialog {
  width: calc(100% - 32px); max-width: 440px; padding: 28px; border: 1px solid var(--line); border-radius: 24px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-family: var(--font);
}
.sp-dialog::backdrop { background: rgba(20, 38, 28, .45); }
.sp-dialog form { margin: 0; }
.sp-dialog-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.sp-dialog-actions .btn, .sp-dialog-actions .ghost { width: 100%; border: 1px solid transparent; cursor: pointer; font-family: var(--font); }
.sp-dialog-actions .ghost { border-color: var(--line); background: transparent; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .sp-card { padding: 24px; }
  .sp-small { padding: 24px; }
  .sp-hero { gap: 22px; }
  .sp-hero-actions { max-width: none; flex-basis: 100%; }
  .sp-h2 { font-size: 24px; }
  .sp-lead { font-size: 16px; }
  .sp-sum { font-size: 17px; }
  .sp-row { font-size: 15px; }
  .sp-rel:hover { transform: none; }
  /* The sign-up box comes straight after the top card, and the official links come last. */
  .sp-cols { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 20px; }
  .sp-side { display: contents; }
  .sp-alert { order: 0; }
  .sp-main { order: 1; gap: 20px; flex: 0 0 auto; }
  .sp-linkscard { order: 2; }
  .sp-related { margin-top: 44px; }
  .sp-rel-grid { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-rel { transition: none; }
  .sp-rel:hover { transform: none; }
}
