.fm-footer {
  --footer-rule: #294660;
  --footer-copy: #b9cedf;
  --footer-accent: #71e5ff;
  padding: clamp(34px, 5vw, 64px) 0 22px;
  color: #f3f9ff;
  background: radial-gradient(ellipse at 91% 0%, #103450 0%, #071d35 37%, #06172c 75%);
  border-top: 1px solid var(--footer-rule);
}

.fm-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .65fr) minmax(0, .8fr) minmax(230px, .95fr);
  align-items: start;
  gap: clamp(22px, 3.4vw, 50px);
  padding-bottom: clamp(27px, 4vw, 49px);
}

.fm-footer .brand {
  gap: 10px;
  color: white;
}

.fm-footer .brand img {
  width: 42px;
  height: 44px;
}

.fm-footer .brand strong {
  display: block;
  font-size: clamp(23px, 2.6vw, 30px);
  line-height: 1;
}

.fm-footer .brand strong span {
  font: inherit;
  color: #209bff;
}

.fm-footer .brand small {
  font-size: 6px;
  letter-spacing: 1px;
  color: #e6f4ff;
}

.fm-footer p {
  max-width: 29ch;
  color: var(--footer-copy);
  font-size: 13px;
  line-height: 1.65;
}

.fm-footer-brand p {
  margin-top: 15px;
}

.fm-footer h2 {
  margin: 0 0 9px;
  color: #f4faff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.015em;
}

.fm-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-top: 4px;
}

.fm-footer nav a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  color: var(--footer-copy);
  font-size: 13px;
  line-height: 1.4;
}

.fm-footer nav a[aria-current="page"],
.fm-footer :is(nav a, .fm-footer-top, .fm-footer-settings button, summary):hover {
  color: var(--footer-accent);
}

.fm-footer nav a:hover,
.fm-footer-top:hover,
.fm-footer-settings :is(summary, button):hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fm-footer-support {
  padding: 17px 18px 18px;
  border: 1px solid #d4a6575e;
  border-radius: 14px;
  background: linear-gradient(125deg, #112e46, #0b253d);
}

.fm-footer-support h2 {
  margin-bottom: 5px;
  color: #ffe5a5;
}

.fm-footer-give {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  min-height: 42px;
  gap: 10px;
  padding: 7px 11px;
  margin-top: 13px;
  border-radius: 8px;
  background: #ffd779;
  color: #12283f;
  font-size: 12px;
  font-weight: 700;
}

.fm-footer-give:hover {
  background: #ffe8a6;
}

.fm-footer-give span,
.fm-footer-top span {
  font: 18px/1 var(--font);
}

.fm-footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px 22px;
  padding-top: 13px;
  border-top: 1px solid var(--footer-rule);
  color: var(--footer-copy);
  font-size: 12px;
}

.fm-footer-credit {
  display: grid;
  gap: 4px;
  padding-block: 12px;
}

.fm-footer-attribution {
  font-size: 11px;
  line-height: 1.5;
}

.fm-footer-attribution strong {
  color: #f3f9ff;
  font-weight: 600;
}

.fm-footer-settings {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0 20px;
}

.fm-footer-settings :is(button, summary),
.fm-footer-top {
  min-height: 42px;
  padding: 9px 0;
  color: #d5e8f6;
  background: none;
  font: 500 12px/1.5 var(--font);
}

.fm-footer-settings summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  list-style: none;
}

.fm-footer-settings summary::-webkit-details-marker {
  display: none;
}

.fm-footer-settings summary::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.fm-footer-settings details[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}

.fm-footer-privacy p {
  max-width: 30ch;
  padding: 0 0 10px;
  font-size: 12px;
}

.fm-footer-settings button[aria-pressed="true"] {
  color: var(--footer-accent);
}

.fm-footer-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: end;
}

.fm-footer :is(a, button, summary):focus-visible {
  outline: 2px solid var(--footer-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .fm-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 26px;
  }
}

@media (max-width: 580px) {
  .fm-footer-grid :is(.fm-footer-brand, .fm-footer-support) { grid-column: 1 / -1; }
  .fm-footer nav a { min-height: 36px; }
  .fm-footer-brand p, .fm-footer-support p { max-width: 43ch; }

  .fm-footer-bottom { grid-template-columns: minmax(0, 1fr) auto; }
  .fm-footer-settings {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: space-between;
    border-top: 1px solid var(--footer-rule);
    padding-top: 4px;
  }
  .fm-footer-top { grid-area: 1 / 2; }
}

@media (max-width: 360px) {
  .fm-footer-settings { gap: 0 10px; }
  .fm-footer-settings :is(summary, button) { font-size: 11px; }
}
