@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap');

/* ─────────────────────────────────────────────────────────────
   SJDEFI Document Design System — Registrar page
   Scoped to .registrar-page to prevent bleed to/from other pages.
   Mirrors the same token/component set as privacy.php.
   ───────────────────────────────────────────────────────────── */

:root {
  --brand-navy:       #0c1f6e;
  --brand-navy-deep:  #061454;
  --brand-blue:       #1e40af;
  --brand-blue-bright:#2756d6;
  --brand-gold:       #c79a3a;
  --brand-gold-soft:  #efe1bc;

  --ink:       #1f2430;
  --ink-2:     #3b4252;
  --muted:     #6b7280;
  --muted-2:   #9aa0ab;
  --line:      #e5e7eb;
  --line-soft: #eef0f4;
  --bg:        #f5f6f8;
  --card:      #ffffff;
  --hairline:  #d8dbe3;

  --accent:      var(--brand-navy);
  --accent-soft: #e8ecfb;

  --body-size:    16px;
  --body-leading: 1.85;
  --content-max:  720px;

  --header-utility-h: 44px;
  --header-banner-h:  132px;
  --header-nav-h:     56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

/* Neutralise styles.css `section { margin: 8rem auto; padding: 0 8rem; }` */
.registrar-page .hero,
.registrar-page .section {
  margin: 0;
  padding: 0;
}

/* Base font + antialiasing scoped to registrar page */
.registrar-page {
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: 100%;
}

.registrar-page a { color: var(--accent); text-decoration: none; }
.registrar-page a:hover { text-decoration: underline; }

/* External link indicator — appears after any link that opens in a new tab */
.registrar-page a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 4px;
  vertical-align: super;
  position: relative;
  top: 2px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0.75;
  flex-shrink: 0;
}

/* seniorhigh.css malformed selectors bleed Playfair Display onto all p/h2/h3/h4 sitewide.
   Re-declare sans-serif explicitly so direct-element rules beat inheritance. */
.registrar-page p,
.registrar-page li,
.registrar-page dt,
.registrar-page dd,
.registrar-page td,
.registrar-page th,
.registrar-page label,
.registrar-page select,
.registrar-page strong,
.registrar-page em,
.registrar-page h4,
.registrar-page h5,
.registrar-page h6,
.registrar-page button {
  font-family: Arial, Helvetica, sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(180deg, #f5f6f8 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 32px 44px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.page-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--brand-navy);
  margin: 0;
}
.page-title .amp { color: var(--brand-gold); }
.hero-sub {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 640px;
}

/* ─────────────────────────────────────────────────────────────
   PROGRESS BAR
   ───────────────────────────────────────────────────────────── */

.progress {
  position: sticky; top: 0; z-index: 40;
  height: 3px; background: transparent;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--brand-blue-bright));
  transition: width .12s linear;
}

/* ─────────────────────────────────────────────────────────────
   CONTENT LAYOUT — two-column with sticky TOC
   ───────────────────────────────────────────────────────────── */

.doc {
  max-width: 1320px; margin: 0 auto;
  padding: 20px 32px 96px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.doc > * { min-width: 0; }

/* Override bootnavbar.css `nav { background:#00245a; font-family:"Open Sans"; font-size:14px }` */
.registrar-page .toc,
.registrar-page .toc * {
  background: transparent !important;
  border-radius: 0 !important;
}
.registrar-page .toc {
  position: sticky; top: 32px;
  align-self: start;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-size: 13.5px !important;
  line-height: 1.5;
  color: var(--ink-2) !important;
}
.registrar-page .toc h6 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-size: 11px !important;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--muted) !important;
  background: transparent !important;
}
.registrar-page .toc ol {
  list-style: none; margin: 0; padding: 0;
  counter-reset: toc;
  border-left: 1px solid var(--line);
  background: transparent !important;
}
.registrar-page .toc li {
  counter-increment: toc;
  position: relative;
  background: transparent !important;
}
.registrar-page .toc a,
.registrar-page .toc a:link,
.registrar-page .toc a:visited {
  display: block;
  padding: 8px 14px 8px 18px;
  color: var(--ink-2) !important;
  background: transparent !important;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 500;
  text-decoration: none !important;
  box-shadow: none !important;
}
.registrar-page .toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--muted-2) !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-size: 11px !important;
  font-variant-numeric: tabular-nums;
  margin-right: 10px;
  font-weight: 600;
  background: transparent !important;
}
.registrar-page .toc a:hover,
.registrar-page .toc a:focus {
  color: var(--accent) !important;
  text-decoration: none !important;
  background: var(--accent-soft) !important;
  box-shadow: none !important;
}
.registrar-page .toc a:hover::before,
.registrar-page .toc a:focus::before { color: var(--accent) !important; background: transparent !important; }
.registrar-page .toc a.active,
.registrar-page .toc a.active:visited {
  color: var(--accent) !important;
  border-left-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}
.registrar-page .toc a.active::before { color: var(--accent) !important; background: transparent !important; }

/* Override site-wide `article { display: flex }` from styles.css */
.article {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 64px clamp(28px, 5vw, 72px);
  box-shadow: 0 1px 0 rgba(12,31,110,.04), 0 24px 60px -40px rgba(12,31,110,.18);
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.article > * { max-width: var(--content-max); }

/* Section heads */
.section { scroll-margin-top: 24px; }
.section + .section { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--line-soft); }

.h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
  display: flex; align-items: baseline; gap: 18px;
  flex-wrap: wrap;
}
.h2 .num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 10px;
  border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 700;
  letter-spacing: .04em;
  flex-shrink: 0;
  white-space: nowrap;
  transform: translateY(-2px);
}
.section-lede {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 28px 62px;
  letter-spacing: .02em;
}
.h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 40px 0 12px;
  display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap;
}
.h3 .sub-num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.article p { margin: 0 0 20px; color: var(--ink-2); }
.article p.lead { font-size: 19px; line-height: 1.7; color: var(--ink); }
.article ul { margin: 10px 0 22px; padding: 0; list-style: none; }
.article ul li {
  position: relative;
  padding: 6px 0 6px 24px;
  color: var(--ink-2);
}
.article ul li::before {
  content: ""; position: absolute; left: 5px; top: 16px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.article ul ul { margin: 4px 0 4px; }
.article ul ul li::before { background: transparent; border: 1.5px solid var(--accent); }

/* ul nested inside ol (e.g. bank account list in enrollment process) */
.article ol ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 6px;
}
.article ol ul li {
  position: relative;
  padding: 6px 0 6px 24px;
  color: var(--ink-2);
}
.article ol ul li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--accent);
}

.article ol {
  margin: 10px 0 22px;
  padding: 0 0 0 24px;
  color: var(--ink-2);
}
.article ol li {
  padding: 4px 0 4px 8px;
  color: var(--ink-2);
}

.article .group-label {
  margin: 14px 0 4px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  letter-spacing: .01em;
}

/* Data table */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: var(--content-max);
}
.data-table {
  width: 100%;
  min-width: 480px;
  font-size: 14px;
  border-collapse: collapse;
}
.data-table thead th {
  background: var(--accent);
  color: #fff;
  text-align: left;
  padding: 14px 18px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-2);
  vertical-align: top;
}
.data-table tbody tr:nth-child(even) td { background: #fafbfd; }

/* Callout */
.callout {
  margin: 20px 0;
  padding: 16px 20px;
  background: #fafbff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 16px;
  color: var(--ink-2);
}
.callout strong { color: var(--ink); }

/* Contact card */
.contact-card {
  margin-top: 96px;
  background:
    radial-gradient(140% 90% at 100% 0%, rgba(255,255,255,.08) 0%, transparent 60%),
    linear-gradient(135deg, #0c1f6e 0%, #1531a8 60%, #1d4ed8 100%);
  color: #fff;
  border-radius: 20px;
  padding: 44px clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  max-width: 100%;
  box-shadow: 0 30px 60px -40px rgba(12,31,110,.5);
  position: relative;
  overflow: hidden;
}
.contact-card::after {
  content: ""; position: absolute; right: -100px; bottom: -100px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(199,154,58,.25), transparent 70%);
  pointer-events: none;
}
.contact-card h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 12px;
  color: #fff;
}
.contact-card p { margin: 0 0 6px; color: #c8d0ee; font-size: 15px; line-height: 1.6; max-width: 480px; }
.contact-card p:last-of-type { margin-bottom: 0; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; min-width: 220px; position: relative; z-index: 1; }
.contact-actions .b-primary,
.contact-actions .b-secondary {
  display: inline-flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  transition: transform .15s ease, background .15s ease;
}
.contact-actions .b-primary { background: var(--brand-gold); color: #1c1305; }
.contact-actions .b-primary:hover { background: #d6a849; text-decoration: none; transform: translateY(-1px); }
.contact-actions .b-secondary { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.contact-actions .b-secondary:hover { background: rgba(255,255,255,.16); text-decoration: none; }

/* Back to top */
.to-top {
  position: fixed; right: 28px; bottom: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 24px -8px rgba(12,31,110,.5);
  z-index: 60;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  cursor: pointer; border: none;
}
.to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-navy-deep); }

/* Mobile TOC trigger */
.mobile-toc {
  display: none;
  margin: 0 0 24px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-2);
}
.mobile-toc select {
  width: 100%; padding: 8px 10px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 16px; /* ≥16px prevents iOS Safari auto-zoom on focus */
  color: var(--ink); background: #fff;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .doc { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .doc { grid-template-columns: 1fr; gap: 0; padding: 24px 16px 64px; }
  .registrar-page .toc { display: none; }
  .mobile-toc { display: block; }
  .hero-inner { padding: 32px 16px 28px; }
  .hero-sub { font-size: 16px; }
  .article { padding: 28px 20px; border-radius: 12px; }
  .section { scroll-margin-top: 80px; }
  .section + .section { margin-top: 48px; padding-top: 36px; }
  .contact-card { grid-template-columns: 1fr; gap: 20px; padding: 28px 22px; margin-top: 48px; }
  .contact-card h3 { font-size: 22px; }
  .contact-actions { min-width: 0; width: 100%; }
  .h2 { font-size: 24px; }
  .h2 .num { min-width: 36px; height: 36px; font-size: 12px; }
  .section-lede { margin-left: 46px; font-size: 14px; }
  .h3 { font-size: 17px; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .registrar-page { font-size: 15px; }
  .hero-inner { padding: 24px 14px 20px; }
  .doc { padding: 16px 12px 48px; }
  .article { padding: 22px 16px; border-radius: 10px; }
  .contact-card { padding: 22px 16px; }
  .contact-actions .b-primary,
  .contact-actions .b-secondary { padding: 12px 14px; font-size: 13px; }
}
