/* Shared public-site footer. Source markup: static/partials/site-footer.html,
 * stamped into every public page by scripts/stamp_site_footer.py (edit the
 * partial, never a page copy — CI fails if a page drifts).
 *
 * Pages use several unrelated design systems (some dark-only, some light-only,
 * some token-driven), so this sheet owns NO colours of its own: everything is
 * derived from the host page's text colour via currentColor. That keeps it
 * legible on any background and in both themes with zero per-page overrides.
 * Selectors are class-scoped (.sf …) so page-level `footer`, `a`, `ul`, `h2`
 * rules cannot leak in, and it is a <div role="contentinfo"> for the same reason.
 */
.sf{
  --sf-dim:color-mix(in srgb,currentColor 72%,transparent);
  --sf-line:color-mix(in srgb,currentColor 16%,transparent);
  box-sizing:border-box;width:100%;margin:0;padding:28px 0 20px;
  font-family:inherit;font-size:13px;font-weight:400;line-height:1.5;color:inherit;text-align:left;
  border-top:1px solid var(--sf-line);
}
.sf *,.sf *::before,.sf *::after{box-sizing:border-box}
.sf[hidden]{display:none}
/* --page-max (1600px, defined by the host page) box + 32px gutters = the same content edge the pages and the nav use. */
.sf-wrap{max-width:var(--page-max,1600px);margin:0 auto;padding:0 var(--page-gutter,32px)}
.sf ul{list-style:none;margin:0;padding:0;color:inherit}   /* same protection as the nav: page-level `ul{color:..}` must not leak in */
.sf li{margin:0;padding:0;border:0}
.sf a{color:var(--sf-dim);text-decoration:none;font-weight:400;border:0}
.sf a:hover,.sf a:focus-visible{color:inherit;text-decoration:underline;text-underline-offset:3px}
.sf a:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:4px}

/* Centered, small footer (design option C): logo, ONE row of links, social icons, then a thin legal line —
 * everything centered. Links are separated by spacing, not dots: a dot would start or end a line wherever the row wraps
 * (some pages use a wider font and wrap at desktop width). */
.sf-wrap{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.sf .sf-logo{display:inline-flex;align-items:center;gap:10px;font-size:15px;font-weight:700;letter-spacing:-.01em;line-height:24px;min-height:40px;color:inherit!important}
.sf .sf-logo img{width:24px;height:24px;border-radius:6px;display:block}
.sf-pro{color:var(--mint-display,var(--mint-text,var(--mint,currentColor)));font-weight:600}

.sf-nav{max-width:100%}
.sf-nav ul,.sf-legal ul{display:flex;flex-wrap:wrap;justify-content:center;gap:0 18px}
.sf-nav a,.sf-legal a{display:inline-flex;align-items:center;min-height:32px;font-size:13px}
/* inherit, NOT var(--sf-dim): .sf-bottom is already dimmed and --sf-dim is built from currentColor, so re-applying it
   dimmed these links twice (3.45:1). */
.sf-legal a{font-size:12px;color:inherit}

/* Social: quiet round icon buttons. */
.sf .sf-social{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:2px 0 0}
.sf .sf-social a{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--sf-line);border-radius:50%;transition:color .15s,border-color .15s}
.sf-social svg{display:block;width:17px;height:17px}
.sf-social a:hover,.sf-social a:focus-visible{color:inherit;border-color:currentColor;text-decoration:none}

.sf-bottom{display:flex;flex-direction:column;align-items:center;width:100%;margin-top:6px;padding-top:8px;border-top:1px solid var(--sf-line);font-size:12px;color:var(--sf-dim)}
.sf-copy{padding:2px 0 4px}

@media (max-width:719px){
  .sf{padding:22px 0 16px}
  .sf-nav a,.sf-legal a{min-height:36px}
  .sf-nav ul,.sf-legal ul{gap:0 16px}
  .sf .sf-social a{width:44px;height:44px}
  .sf-social svg{width:18px;height:18px}
}

.sf-prefs{display:inline-flex;align-items:center;min-height:44px;margin:0;padding:0;background:none;border:0;
  /* inherit, NOT var(--sf-dim): it sits inside .sf-bottom, which is already dimmed, and
     --sf-dim is built from currentColor — re-applying it dimmed the text twice (3.45:1). */
  color:inherit;font:inherit;font-size:12px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.sf-prefs:hover{text-decoration-thickness:2px}
.sf-prefs:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:4px}
.sf-prefs[hidden]{display:none}

/* Consent banner. Colours are copied from the host page at open time (JS sets the
 * two custom properties) so it matches every page's theme without owning a colour. */
.sf-consent{position:fixed;left:16px;right:16px;bottom:16px;z-index:2147483000;max-width:640px;margin:0 auto;
  display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;padding:16px;
  background:var(--sf-consent-bg,Canvas);color:var(--sf-consent-fg,CanvasText);
  border:1px solid color-mix(in srgb,currentColor 25%,transparent);border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.25);font-family:inherit;font-size:13px;line-height:1.5}
.sf-consent-text{flex:1 1 260px;margin:0}
.sf-consent-text a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.sf-consent-actions{display:flex;gap:10px;flex:0 0 auto}
.sf-consent-btn{min-height:44px;min-width:96px;padding:0 18px;border-radius:10px;cursor:pointer;font:inherit;font-weight:600;
  background:transparent;color:inherit;border:1px solid color-mix(in srgb,currentColor 35%,transparent)}
.sf-consent-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.sf-consent-accept{background:var(--sf-consent-fg,CanvasText);color:var(--sf-consent-bg,Canvas);border-color:transparent}
/* Desktop: a compact card in the bottom-left corner, so it never sits on top of centred calls to action. */
@media (min-width:720px){.sf-consent{left:20px;right:auto;bottom:20px;margin:0;max-width:440px}.sf-consent-actions{width:100%}.sf-consent-btn{flex:1}}
@media (max-width:480px){.sf-consent-actions{width:100%}.sf-consent-btn{flex:1}}
/* Back-to-top button (site-footer.js). Colours are set from the host page at show time via --sf-top-bg/--sf-top-fg. */
.sf-top-btn{position:fixed;right:20px;bottom:max(20px,env(safe-area-inset-bottom));z-index:90;width:44px;height:44px;margin:0;padding:0;
  display:grid;place-items:center;border:0;border-radius:50%;cursor:pointer;
  background:var(--sf-top-bg,currentColor);color:var(--sf-top-fg,Canvas);
  box-shadow:0 6px 20px rgba(0,0,0,.28);-webkit-tap-highlight-color:transparent;
  opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .2s,transform .2s,visibility 0s linear .2s}
.sf-top-btn.is-shown{opacity:.92;visibility:visible;transform:none;transition:opacity .2s,transform .2s}
.sf-top-btn:hover{opacity:1}
.sf-top-btn:focus-visible{outline:2px solid var(--sf-top-bg,currentColor);outline-offset:3px}
@media (max-width:719px){.sf-top-btn{right:14px}}
@media (prefers-reduced-motion:reduce){.sf-top-btn{transition:none}}

@media (prefers-reduced-motion:reduce){.sf-social a{transition:none}}
