/* Campus Filing: site chrome and page-level layout.
   Header and footer markup is duplicated in each page rather than
   injected with JS, so every page works when opened straight from
   the file system without a server running. */

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--ink);
  color: var(--white);
  border-bottom: 3px solid var(--forest);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 62px;
}

.wordmark {
  font-family: "Newsreader", Georgia, serif;
  font-size: 21px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.wordmark em { font-style: normal; color: #8FBFA6; }

.site-nav { display: flex; gap: 22px; align-items: center; margin-left: auto; }

.site-nav a {
  color: #C6CFD4;
  text-decoration: none;
  font-size: 14.5px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--white); }

.site-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: #8FBFA6;
}

.nav-cta {
  background: var(--btn-accent-bg);
  color: var(--btn-accent-fg) !important;
  padding: 8px 16px !important;
  border-radius: var(--radius);
  border-bottom: none !important;
  font-weight: 500;
}

.nav-cta:hover { background: var(--btn-accent-bg-hover); }

/* Who is signed in, written into the nav by session.js. The address is
   quieter than the links around it: it is there to be checked, not
   read, and a student who glances at the header wants to know which
   account they are in rather than to be told their own email. */
.nav-session { display: flex; align-items: center; gap: 14px; }

.nav-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white) !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  border-bottom: none !important;
  padding: 0 !important;
  flex: 0 0 auto;
}

.nav-initials:hover { background: var(--btn-accent-bg-hover); }

.nav-signout {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #C6CFD4;
  font: inherit;
  font-size: 14.5px;
  padding: 6px 0;
  cursor: pointer;
}

.nav-signout:hover { color: var(--white); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid #3C464C;
  color: var(--white);
  border-radius: var(--radius);
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- page header band ---------- */

.page-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 44px 0 38px;
}

.page-head .eyebrow { color: var(--forest); font-size: 14px; font-weight: 600; margin: 0 0 6px; }

.page-head h1 { max-width: 22ch; margin-bottom: 12px; }

.page-head p { color: var(--slate); font-size: 17px; }

/* ---------- generic sections ---------- */

.band { padding: 52px 0; }

.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.band-sand { background: var(--sand); }

.band-ink { background: var(--ink); color: var(--white); }

.band-ink h2, .band-ink h3 { color: var(--white); }

.band-ink p { color: #BFC8CD; }

.band-head { margin-bottom: 28px; }

.band-head p { color: var(--slate); }

.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 34px; }

.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }

.cols-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

/* ---------- article layout for guides ---------- */

.article {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding: 44px 0 64px;
}

.toc { position: sticky; top: 90px; font-size: 14px; }

.toc h4 { margin-bottom: 10px; color: var(--muted); font-weight: 500; font-size: 13px; }

.toc ul { list-style: none; padding: 0; margin: 0; }

.toc a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--line-soft);
  color: var(--slate);
  text-decoration: none;
}

.toc a:hover { border-left-color: var(--blue); color: var(--navy); }

.prose h2 { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); }

.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.prose h3 { margin-top: 1.8rem; }

.prose li { margin-bottom: .4rem; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: #A9B4BA;
  padding: 44px 0 34px;
  font-size: 14px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #2A3238;
}

.site-footer h4 { color: var(--white); font-size: 13px; margin-bottom: 10px; font-weight: 600; }

.site-footer ul { list-style: none; padding: 0; margin: 0; }

.site-footer li { margin-bottom: 7px; }

.site-footer a { color: #A9B4BA; text-decoration: none; }

.site-footer a:hover { color: var(--white); text-decoration: underline; }

.footer-legal { padding-top: 22px; font-size: 13px; color: #7C878D; }

.footer-legal p { max-width: 88ch; margin-bottom: 8px; }

.footer-theme { margin-top: 14px; }

@media (max-width: 900px) {
  .wrap, .header-inner { padding: 0 20px; }
  h1 { font-size: 31px; }
  h2 { font-size: 24px; }
  .split, .article { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .site-nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 18px;
    border-bottom: 3px solid var(--forest);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 0; border-bottom: 1px solid #2A3238; }
  .nav-cta { text-align: center; margin-top: 10px; }
  /* Stacked with the links rather than beside them, so the address does
     not get squeezed into an ellipsis on a phone. */
  /* Stacked with the links on a phone. The circle keeps its shape and
     sits on its own line rather than being squeezed beside the button. */
  .nav-session { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-initials { margin: 12px 0 4px; }
  .nav-signout { text-align: left; padding: 4px 0 11px; border-bottom: 1px solid #2A3238; }
  .nav-toggle { display: block; }
  .band { padding: 36px 0; }
}

/* Campus Filing visual refresh. Shared chrome for all pages. */
.site-header { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; gap: 24px; }
.site-header .wordmark { color: var(--ink); font-size: 24px; }
.site-header .wordmark em { color: var(--forest); }
.site-nav { gap: 20px; }
.site-nav a { color: var(--slate); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--forest); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--forest); }
/* The session controls follow the links. Without this they keep the
   colours set for a dark header and vanish into a light one. */
.site-nav .nav-signout { color: var(--slate); }
.site-nav .nav-signout:hover { color: var(--forest); }
.nav-toggle { color: var(--ink); border-color: var(--line); }
.site-footer { background: var(--paper); color: var(--slate); border-top: 1px solid var(--line); }
.site-footer .wordmark, .site-footer h4 { color: var(--ink); }
.site-footer .wordmark em { color: var(--forest); }
.site-footer a { color: var(--slate); }
.site-footer a:hover { color: var(--forest); }
.footer-grid { border-bottom-color: var(--line); }
.footer-legal { color: var(--slate); }
.prose h2, .prose h3 { scroll-margin-top: 100px; }
@media (max-width: 1050px) {
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 14px; }
  .header-inner { gap: 16px; }
}
@media (max-width: 900px) {
  .site-nav { top: 76px; background: var(--paper); border-bottom: 1px solid var(--line); max-height: calc(100dvh - 76px); overflow-y: auto; }
  .site-nav a { padding: 12px 0; border-bottom-color: var(--line); }
}
@media (max-width: 360px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
}
