/* The shared Codex Publicus footer: styles for footer/footer.html (see footer/README.md).
   One quiet line: the Codex Publicus lead, the project's accounts as icons, then the site's own line if it has one.
   Self-contained: every rule is scoped to .cp-footer, so a site can load it beside its own CSS.
   The site supplies Source Serif 4; the stack falls back without it.
   Theme: prefers-color-scheme, overridden by data-theme="light" or data-theme="dark" on <html>.
   --cp-footer-width on .cp-footer sets the column the line sits in (default 38rem, the family measure). */

.cp-footer {
  --cp-ground: #f8f7f4;
  --cp-muted: #5d584f;
  --cp-rule: #d9d4ca;
  --cp-accent: #2f6b5f;
  --cp-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cp-footer {
    --cp-ground: #161513;
    --cp-muted: #a9a398;
    --cp-rule: #3a3731;
    --cp-accent: #7fbfae;
  }
}
:root[data-theme="dark"] .cp-footer {
  --cp-ground: #161513;
  --cp-muted: #a9a398;
  --cp-rule: #3a3731;
  --cp-accent: #7fbfae;
}

.cp-footer {
  margin-top: 4rem;
  padding: 0 1rem;
  color: var(--cp-muted);
  font: 0.875rem/1.6 var(--cp-serif);
}
.cp-footer-inner {
  box-sizing: border-box;
  max-width: calc(var(--cp-footer-width, 38rem) - 2rem);
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
  border-top: 1px solid var(--cp-rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
}
.cp-footer a { color: inherit; }
.cp-footer a:hover { color: var(--cp-accent); }

.cp-footer-lead { white-space: nowrap; }
.cp-footer-lead a { text-decoration: none; }
.cp-footer-of + a { margin-left: 0.15em; }
.cp-footer-name {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.15em;
}
.cp-footer-lead a:hover .cp-footer-name { text-decoration-color: currentColor; }
.cp-footer-mark {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.35em;
  vertical-align: -3px;
}
.cp-footer .cp-ink { fill: currentColor; }
.cp-footer .cp-cut { fill: var(--cp-ground); }

.cp-footer-icons { display: inline-flex; align-items: center; gap: 0.25rem; }
.cp-footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
}
.cp-footer-icon svg { display: block; width: 1rem; height: 1rem; fill: currentColor; }

.cp-footer-line { margin: 0; }
