/*
 * Scientari shared footer 0.1 - styles.
 * To match a site, override the variables (in the site's own CSS), e.g.
 *   .sf { --sf-link: #4a2574; --sf-font: "DM Sans", sans-serif; }
 * Defaults inherit the site's font and text colour.
 */
.sf {
  --sf-font: inherit;
  --sf-size: 0.875rem;
  --sf-fg: inherit;
  --sf-muted: color-mix(in srgb, currentColor 68%, transparent);
  --sf-link: inherit;
  --sf-border: color-mix(in srgb, currentColor 18%, transparent);
  --sf-bg: transparent;
  --sf-focus: #7a4fb5;
  --sf-gap: 1.25rem;
  --sf-max-width: 72rem;
  --sf-logo-height: 32px;

  box-sizing: border-box;
  max-width: var(--sf-max-width);
  margin: 0 auto;
  padding: 1.5rem 16px;
  border-top: 1px solid var(--sf-border);
  background: var(--sf-bg);
  color: var(--sf-fg);
  font-family: var(--sf-font);
  font-size: var(--sf-size);
  line-height: 1.5;
}
.sf *, .sf *::before, .sf *::after { box-sizing: inherit; }
.sf p, .sf ul { margin: 0; padding: 0; }
.sf ul { list-style: none; }
.sf a, .sf .sf-linkbtn { color: var(--sf-link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.sf a:hover, .sf .sf-linkbtn:hover { text-decoration-thickness: 2px; }
.sf a:focus-visible, .sf .sf-linkbtn:focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; border-radius: 2px; }
.sf .sf-linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* Tools */
.sf-heading { font-weight: 600; margin-bottom: 0.5rem !important; }
.sf-list { display: flex; flex-wrap: wrap; gap: 0.5rem var(--sf-gap); }
.sf-item { display: flex; flex-direction: column; min-width: 9rem; }
.sf-name { font-weight: 600; text-decoration: none !important; }
.sf-name:hover { text-decoration: underline !important; }
.sf-short { color: var(--sf-muted); font-size: 0.92em; }

/* Notice, legal, company */
.sf-notice { margin-top: 1rem !important; color: var(--sf-muted); }
.sf-legal { margin-top: 1rem; }
.sf-inline { display: flex; flex-wrap: wrap; gap: 0.25rem 0; }
.sf-inline li:not(:last-child)::after,
.sf-company > span:not(:last-child)::after { content: "\00B7"; margin: 0 0.5em; color: var(--sf-muted); }
.sf-company { margin-top: 0.5rem !important; color: var(--sf-muted); display: flex; flex-wrap: wrap; }

/* Scientari logo */
.sf-brandline { margin-top: 1.25rem !important; }
.sf-brand { display: inline-block; line-height: 0; text-decoration: none !important; }
.sf-logo { height: var(--sf-logo-height); width: auto; display: none; }
.sf[data-sf-theme="dark"] .sf-logo-white,
.sf[data-sf-theme="light"] .sf-logo-purple { display: block; }
.sf[data-sf-theme="auto"] .sf-logo-purple { display: block; }
@media (prefers-color-scheme: dark) {
  .sf[data-sf-theme="auto"] .sf-logo-purple { display: none; }
  .sf[data-sf-theme="auto"] .sf-logo-white { display: block; }
}
.sf-brand-text { line-height: 1.2; font-weight: 700; letter-spacing: 0.02em; font-size: 1.1em; }

/* Phones: tools as a compact two-column list */
@media (max-width: 600px) {
  .sf-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
  .sf-item { min-width: 0; }
}
@media (max-width: 360px) {
  .sf-list { grid-template-columns: 1fr; }
}
@media print { .sf-tools { display: none; } }
