/* Same footer as the home page. Loaded on every HTML page. */
.site-footer {
  border-top: 1px solid var(--border, #2a2a3a);
  padding: 32px 24px;
  text-align: center;
  margin-top: 24px;
}
.site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim, #8888a0);
  font-family: var(--mono, ui-monospace, monospace);
}
.footer-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-dim, #8888a0);
  text-decoration: none;
  font-family: var(--mono, ui-monospace, monospace);
}
.footer-links a:hover { color: var(--accent, #498a9b); }
/* HF emoji — monochrome to match text links */
.footer-links .hf-emoji,
.about-social-link .hf-emoji {
  font-size: 14px;
  line-height: 1;
  filter: grayscale(1) contrast(1.1) brightness(0.85);
  flex-shrink: 0;
}
.footer-links a:hover .hf-emoji,
.about-social-link:hover .hf-emoji {
  filter: grayscale(1) contrast(1.1) brightness(0.7);
}
@media (max-width: 500px) {
  .site-footer-inner { flex-direction: column; text-align: center; }
}

/* Previous / next — same look as Python Under the Hood .chapter-nav.
   Sit tight under the last section: one divider, no stacked blank space. */
section:has(+ .chapter-next),
section:has(+ .chapter-nav),
main:has(+ .chapter-next),
main:has(+ .chapter-nav) {
  border-bottom: none;
  padding-bottom: 32px;
}
.chapter-next,
.chapter-nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px 0;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  border-top: 1px solid var(--border, #2a2a3a);
}
.chapter-next a,
.chapter-nav a {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.85rem;
  color: var(--text-dim, #8888a0);
  text-decoration: none;
  line-height: 1.4;
  max-width: 46%;
  transition: color 0.2s;
}
.chapter-next a:hover,
.chapter-nav a:hover {
  color: var(--accent, #498a9b);
}
.chapter-next .chapter-prev { margin-right: auto; text-align: left; }
.chapter-next .chapter-forward { margin-left: auto; text-align: right; }
.chapter-next span { flex: 1; }
