/* ════════════════════════════════════════════════════════════
   SPIT — Body typography & layout
   Loads after style.css and the colour stylesheet.
   Scoped to the legacy #content / #sidebar structure.
════════════════════════════════════════════════════════════ */

:root {
  --spit-ink:       #1f1f1f;
  --spit-ink-soft:  #3d3d3d;
  --spit-ink-muted: #6b6b6b;
  --spit-rule:      #e4e4e4;
  --spit-link:      #7a2020;
  --spit-link-dark: #4a1010;
  --spit-link-line: rgba(122,32,32,.28);
}

/* ── Page background ─────────────────────────────────────── */
/* style.css and red.css both set body to #1b1b1b !important */
html body,
body.home, body.page, body.single, body.archive, body.search, body.error404 {
  background-color: #efebe6 !important;
  background-image: none !important;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--spit-ink-soft);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

#main {
  background: #fff;
  max-width: 1800px;
  margin: 26px auto 34px;
  padding: 30px 36px 40px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #e8e4e0;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 6px 22px rgba(58,14,14,.05);
}

/* ── Homepage box-left (page-custom-home.php) ────────────── */
#content .box-left {
  background: #fff;
  padding: 0 10px;
  overflow: hidden;
  max-width: 100%;
}
#content .box-left img,
#content .box-left iframe,
#content .box-left table { max-width: 100%; height: auto; }
#content .box-left p { padding-bottom: 1.2em; max-width: 82ch; }
#content .box-left h1,
#content .box-left h2 {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.85rem; font-weight: 600;
  color: var(--spit-link); line-height: 1.25;
  letter-spacing: -0.008em; margin-bottom: .5em;
}

/* ── Content column ──────────────────────────────────────── */
#content .post-wrap,
.comment-wrap {
  font-size: 16px;
  color: var(--spit-ink-soft);
  background: #fff;
  margin-left: 0;   /* legacy theme sets 20px — breaks left-edge alignment */
}
#content .post-content { line-height: 1.7; padding: 0; }
#content .post-content p { padding-top: 0; padding-bottom: 1.2em; }

/* Cap measure on body copy only — layout stays full width */
#content .post-content p,
#content .post-content ul,
#content .post-content ol { max-width: 82ch; }

/* ── Headings ────────────────────────────────────────────── */
#content h2,
#content .post-content h2 {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--spit-link);
  line-height: 1.25;
  letter-spacing: -0.008em;
}
#content h2 a,
#content h2 a:hover { color: var(--spit-link); text-decoration: none; }

#content .post-content h3 { font-family: 'Spectral', Georgia, serif; font-size: 1.32rem; font-weight: 600; color: var(--spit-ink); margin: 1.9em 0 .55em; line-height: 1.35; letter-spacing: -0.005em; }
#content .post-content h4 { font-size: 1.1rem;  font-weight: 600; color: var(--spit-ink); margin: 1.5em 0 .45em; letter-spacing: -0.012em; }
#content .post-content h5 { font-size: 1rem;    font-weight: 600; color: var(--spit-ink-soft); }
#content .post-content h6 { font-size: .9375rem; font-weight: 600; color: var(--spit-ink-muted); }

#content .post-heading {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--spit-rule);
  margin: 0 0 18px;
}

/* ── Links ───────────────────────────────────────────────── */
a { color: var(--spit-link); }

#content .post-content a,
#content .post-footer a,
a.url {
  color: var(--spit-link);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--spit-link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
  transition: color .18s ease, text-decoration-color .18s ease;
}
#content .post-content a:hover,
#content .post-footer a:hover {
  color: var(--spit-link-dark);
  text-decoration-color: currentColor;
}
#content .post-content a:focus-visible,
#sidebar .sidebar-item a:focus-visible {
  outline: 2px solid var(--spit-link);
  outline-offset: 2px;
}

/* ── Lists ───────────────────────────────────────────────── */
#content .post-content ul,
#content .post-content ol { margin: 0 0 1.3em 20px; padding: 0; }
#content .post-content li { margin-bottom: .4em; line-height: 1.65; }

/* ── Blockquote ──────────────────────────────────────────── */
#content blockquote {
  background: #faf8f8;
  border-left: 3px solid var(--spit-link);
  padding: 14px 22px;
  margin: 1.8em 0;
  color: var(--spit-ink-muted);
}

/* ── Tables ──────────────────────────────────────────────── */
#content .post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4em;
  font-size: .9375rem;
}
#content .post-content th {
  text-align: left;
  font-weight: 600;
  color: #fff;
  background: var(--spit-link);
  padding: .7rem .9rem;
}
#content .post-content td {
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--spit-rule);
}
#content .post-content tr:nth-child(even) td { background: #faf8f8; }

/* ── Sidebar ─────────────────────────────────────────────── */
#sidebar .sidebar-item {
  font-size: 14px;
  padding: 20px 18px;
  background: #faf8f6;
  border: 1px solid #eee9e4;
  border-radius: 3px;
  margin-bottom: 18px;
}
#sidebar .sidebar-item h3 {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: capitalize;
  color: var(--spit-ink);
  text-transform: none;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--spit-rule);
  margin-bottom: 12px;
}
/* ── Sidebar list items ──────────────────────────────────────
   Legacy arrow.gif is removed (see red.css); markers are CSS now.
   Default = F: chevron + hairline rule, tight rhythm.
   Long-item widgets get H via .sidebar-item--roomy (see below). */
#sidebar .sidebar-item ul { list-style: none; padding-left: 0; margin: 0; }

#sidebar .sidebar-item li {
  position: relative;
  padding: 0 0 10px 17px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee9e4;
  line-height: 1.45;
  background: none;   /* clears any legacy arrow background */
}
#sidebar .sidebar-item li:before {
  content: '\203A';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--spit-link);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
#sidebar .sidebar-item li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Nested lists — no double markers */
#sidebar .sidebar-item li ul { margin-top: 8px; padding-left: 4px; }
#sidebar .sidebar-item li li { padding-bottom: 6px; margin-bottom: 6px; }

/* H — roomier, for widgets with long multi-line entries.
   Add class="sidebar-item sidebar-item--roomy" in sidebar.php. */
#sidebar .sidebar-item--roomy li {
  padding: 0 0 13px 18px;
  margin-bottom: 13px;
  line-height: 1.5;
}
#sidebar .sidebar-item--roomy li:before { line-height: 1.55; }
#sidebar .sidebar-item--roomy li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
#sidebar .sidebar-item a {
  color: var(--spit-ink-soft);
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
}
#sidebar .sidebar-item a:hover { color: var(--spit-link); text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────────── */
#footer {
  background: #3a0e0e;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  padding: 32px 36px;
  margin-top: 0;
  box-sizing: border-box;
}
#footer > * { max-width: 1728px; margin-left: auto; margin-right: auto; }
#footer a { color: rgba(255,255,255,.82); text-decoration: none; }
#footer a:hover { color: #e8b84b; text-decoration: underline; }
#footer p { padding-top: 8px; line-height: 1.8; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  #content, #sidebar { float: none; width: 100%; }
  #sidebar { margin-top: 28px; }
  #main { padding: 20px 20px 26px; }
  #footer { padding: 26px 20px; }
  #content .post-content p,
  #content .post-content ul,
  #content .post-content ol { max-width: none; }
  img { max-width: 100%; height: auto; }
  #content .post-content table { display: block; overflow-x: auto; }
  .alignleft, .alignright { float: none; display: block; margin: 0 auto 20px; padding: 0; }
}



/* ── Sidebar document lists (admissions widget) ──────────── */
#sidebar .spit-doclist {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
}
#sidebar .spit-doclist li {
  position: relative;
  padding: 0 0 10px 17px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee9e4;
  line-height: 1.45;
}
#sidebar .spit-doclist li:before {
  content: '\203A';
  position: absolute; left: 0; top: 0;
  color: var(--spit-link);
  font-size: 15px; font-weight: 700; line-height: 1.5;
}
#sidebar .spit-doclist li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Section headings between lists */
#sidebar .sidebar-item h3 {
  margin-top: 32px;
}
#sidebar .sidebar-item h3:first-child,
#sidebar .sidebar-item h2 + h3 {
  margin-top: 0;
}
#sidebar .sidebar-item h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

#sidebar .spit-form { margin-bottom: 28px; }


/* WPForms uses <li> for checkbox/radio options — no chevrons or rules there */
#sidebar .wpforms-container li:before,
#sidebar .wpforms-field-container li:before { content: none; }

#sidebar .wpforms-container li,
#sidebar .wpforms-field-container li {
  position: static;
  padding: 0;
  margin-bottom: 0;
  border-bottom: none;
  line-height: inherit;
}

#sidebar .wpforms-container ul,
#sidebar .wpforms-field-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#content blockquote {
  background: none;
  border-left: 3px solid var(--spit-link);
  padding: 4px 0 4px 20px;
  margin: 1.8em 0;
  color: var(--spit-ink-muted);
}
