/* Site footer: name, mission line, the doors and the language links; every link is a tap target of at least 44 px (logical properties only). */
.footer {
  padding: var(--s-7) var(--s-4);
  background: var(--surface);
  color: var(--text-muted);
  border-start-start-radius: var(--radius-lg);
  border-start-end-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.footer-brand {
  color: var(--text);
  font-size: var(--fs-2);
  font-weight: 750;
}

.footer-links,
.footer-langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}

.footer-links {
  gap: 0 var(--s-4);
}

/* A hairline sets the language and country choices apart from the page links. */
.footer-langs {
  gap: 0 var(--s-2);
  max-inline-size: 36rem;
  margin: var(--s-5) auto 0;
  padding-block-start: var(--s-3);
  border-block-start: 1px solid var(--border);
}

.footer-links a,
.footer-langs a,
.footer-market .countries-link a {
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-langs a:hover,
.footer-langs a:focus-visible,
.footer-market .countries-link a:hover,
.footer-market .countries-link a:focus-visible {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-links a,
.footer-langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  min-inline-size: 44px;
  padding-inline: var(--s-2);
}

.footer-links a {
  color: var(--text);
  font-weight: var(--fw-strong);
}

.footer-langs a {
  color: var(--text-muted);
  font-family: var(--font-system);
}

/* The country switch under the languages: the same buttons as the menu, in a centred row. */
.footer-market {
  margin-block-start: var(--s-2);
}

.footer-market .market-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--s-2);
}

.footer-market .countries-link {
  display: flex;
  justify-content: center;
}

.footer-market .countries-link a {
  color: var(--text-muted);
}

.footer-market button {
  inline-size: auto;
  min-inline-size: 44px;
  color: var(--text-muted);
  text-align: center;
}

.footer-version {
  color: var(--text-muted, var(--text));
  font-size: var(--fs-0, 0.8125rem);
}

/* The update button (slice F1): above the phone bar, never covering a form; hidden until app.js finds a new release. */
.update-banner {
  position: fixed;
  inset-inline: var(--s-3);
  inset-block-end: calc(var(--bottombar-h, 0px) + env(safe-area-inset-bottom) + var(--s-3));
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-3);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px -8px light-dark(oklch(0.25 0.03 258 / 0.4), oklch(0 0 0 / 0.7));
}

.update-banner[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .update-banner {
    inset-block-end: var(--s-4);
    inset-inline: auto var(--s-4);
    max-inline-size: 24rem;
  }
}
