/* Shared footer presentation. Keep the existing native links and contextual copy. */
body.space-quiet-site #root footer.bg-dark {
  --sf-ink: #172c45;
  --sf-muted: #4c6077;
  --sf-paper: #f3f6fa;
  --sf-line: #d8e1eb;
  --sf-blue: #215b91;
  --sf-hover: #164775;
  color: var(--sf-ink);
  background: var(--sf-paper);
  border-top: 1px solid var(--sf-line);
  font-family: Inter, sans-serif;
}

body.space-quiet-site #root footer.bg-dark > div {
  max-width: 1184px;
  margin-inline: auto;
  padding: 60px 32px 26px;
}

body.space-quiet-site #root footer.bg-dark > div > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

body.space-quiet-site #root footer.bg-dark > div > div:first-child > div,
body.space-quiet-site #root footer.bg-dark nav[aria-label] {
  grid-column: auto;
  min-width: 0;
}

body.space-quiet-site #root footer.bg-dark .space-wordmark-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  color: var(--sf-ink);
}

body.space-quiet-site #root footer.bg-dark .space-wordmark {
  width: 154px;
  height: auto;
}

body.space-quiet-site #root footer.bg-dark .measure-narrow {
  max-width: 31ch;
  margin-top: 16px;
  color: var(--sf-muted);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

body.space-quiet-site #root footer.bg-dark nav[aria-label] {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}

body.space-quiet-site #root footer.bg-dark nav[aria-label] > span {
  color: var(--sf-ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.space-quiet-site #root footer.bg-dark nav[aria-label] ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

body.space-quiet-site #root footer.bg-dark nav[aria-label] a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 100%;
  padding: 5px 0;
  color: var(--sf-muted);
  background: transparent;
  border-radius: 0;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.5;
  text-align: left;
  text-decoration: none;
  text-underline-offset: 5px;
  transition: color 160ms ease, background-color 160ms ease;
}

body.space-quiet-site #root footer.bg-dark nav[aria-label] a:hover {
  color: var(--sf-blue);
  text-decoration: underline;
}

/* The old global nav rule treated this inline footer link as a header button. */
body.space-quiet-site #root footer.bg-dark nav[aria-label] a[href="/apply/"] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  margin-top: 14px;
  padding: 12px 17px;
  border: 1px solid var(--sf-blue);
  border-radius: 8px;
  color: #ffffff;
  background: var(--sf-blue);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}

body.space-quiet-site #root footer.bg-dark nav[aria-label] a[href="/apply/"]:hover {
  color: #ffffff;
  background: var(--sf-hover);
  border-color: var(--sf-hover);
}

body.space-quiet-site #root footer.bg-dark a:focus-visible {
  outline: 3px solid var(--sf-blue);
  outline-offset: 5px;
}

body.space-quiet-site #root footer.bg-dark > div > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--sf-line);
}

body.space-quiet-site #root footer.bg-dark > div > div:last-child > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

body.space-quiet-site #root footer.bg-dark > div > div:last-child :is(a, p) {
  min-height: 24px;
  margin: 0;
  color: var(--sf-muted);
  font-size: 13px;
  line-height: 1.7;
}

body.space-quiet-site #root footer.bg-dark > div > div:last-child a {
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

body.space-quiet-site #root footer.bg-dark > div > div:last-child a:hover {
  color: var(--sf-blue);
  text-decoration-color: currentColor;
}

/* Decorative placeholders are not configured social links. */
body.space-quiet-site #root footer.bg-dark [data-unconfigured-social] {
  display: none;
}

body.space-quiet-site #root footer.bg-dark #next-steps {
  background: #ffffff;
  border-bottom: 1px solid var(--sf-line);
}

body.space-quiet-site #root footer.bg-dark #next-steps > div {
  max-width: 1184px;
  margin-inline: auto;
  padding: 38px 32px 40px;
}

body.space-quiet-site #root footer.bg-dark #next-steps > div > p {
  margin: 0 0 21px;
  color: var(--sf-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .1em;
}

body.space-quiet-site #root footer.bg-dark #next-steps ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--sf-line);
}

body.space-quiet-site #root footer.bg-dark #next-steps li + li {
  border-left: 1px solid var(--sf-line);
}

body.space-quiet-site #root footer.bg-dark #next-steps a {
  display: block;
  height: 100%;
  min-height: 116px;
  padding: 23px 25px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  text-decoration: none;
}

body.space-quiet-site #root footer.bg-dark #next-steps li:first-child a {
  padding-left: 0;
}

body.space-quiet-site #root footer.bg-dark #next-steps a span:first-child {
  color: var(--sf-ink);
  font-size: 18px;
  font-weight: 550;
  line-height: 1.4;
  letter-spacing: -.025em;
}

body.space-quiet-site #root footer.bg-dark #next-steps a span + span {
  max-width: 34ch;
  margin-top: 8px;
  color: var(--sf-muted);
  font-size: 14px;
  line-height: 1.6;
}

body.space-quiet-site #root footer.bg-dark #next-steps a:hover span:first-child {
  color: var(--sf-blue);
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 920px) {
  body.space-quiet-site #root footer.bg-dark > div > div:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 40px;
  }
  body.space-quiet-site #root footer.bg-dark > div > div:first-child > div {
    grid-column: 1 / -1;
  }
  body.space-quiet-site #root footer.bg-dark .measure-narrow {
    max-width: 44ch;
  }
}

@media (max-width: 600px) {
  body.space-quiet-site #root footer.bg-dark > div {
    padding: 38px 24px 22px;
  }
  body.space-quiet-site #root footer.bg-dark > div > div:first-child {
    gap: 32px 24px;
  }
  body.space-quiet-site #root footer.bg-dark nav[aria-label] {
    gap: 12px;
  }
  body.space-quiet-site #root footer.bg-dark nav[aria-label] > span {
    font-size: 14px;
    letter-spacing: .065em;
  }
  body.space-quiet-site #root footer.bg-dark nav[aria-label] a {
    min-height: 44px;
    font-size: 14px;
  }
  body.space-quiet-site #root footer.bg-dark nav[aria-label] a[href="/apply/"] {
    padding: 12px 14px;
    margin-top: 10px;
  }
  body.space-quiet-site #root footer.bg-dark > div > div:last-child {
    margin-top: 30px;
    padding-top: 18px;
  }
  body.space-quiet-site #root footer.bg-dark > div > div:last-child > div:first-child {
    gap: 4px 20px;
  }
  body.space-quiet-site #root footer.bg-dark > div > div:last-child :is(a, p) {
    font-size: 14px;
  }
  body.space-quiet-site #root footer.bg-dark > div > div:last-child a {
    min-height: 44px;
  }
  body.space-quiet-site #root footer.bg-dark #next-steps > div {
    padding: 30px 24px;
  }
  body.space-quiet-site #root footer.bg-dark #next-steps > div > p {
    margin-bottom: 16px;
    font-size: 14px;
  }
  body.space-quiet-site #root footer.bg-dark #next-steps ul {
    grid-template-columns: 1fr;
  }
  body.space-quiet-site #root footer.bg-dark #next-steps li + li {
    border-top: 1px solid var(--sf-line);
    border-left: 0;
  }
  body.space-quiet-site #root footer.bg-dark #next-steps a {
    min-height: 98px;
    padding: 19px 0;
  }
}

@media (max-width: 350px) {
  body.space-quiet-site #root footer.bg-dark > div {
    padding-inline: 20px;
  }
  body.space-quiet-site #root footer.bg-dark > div > div:first-child {
    grid-template-columns: 1fr;
    gap: 28px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.space-quiet-site #root footer.bg-dark a {
    transition: none;
  }
}
