.site-footer {
  border-top: 1px solid #26282c;
  padding: 1.2rem 0 1.5rem;
  background-color: #111112;
  margin-top: 0;
}
.footer__inner {
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.82rem;
  justify-content: center;
}

.footer__links a {
  position: relative;
  display: inline-block;
  color: #9ca3af;
  text-decoration: none !important;
}

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.footer__links a:hover {
  color: #f9fafb;
  text-decoration: none !important;
}

.footer__links a:hover::after,
.footer__links a:focus-visible::after {
  transform: scaleX(1);
}

.footer__links a:focus-visible {
  text-decoration: none !important;
}

/* =====================================================================
   Columned footer (homepage + pages generated from it).
   Pages that keep the older single-row footer markup only use the rules
   above, so everything below is additive.
   ===================================================================== */

.footer__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(140px, 1fr));
  gap: 28px 32px;
  width: 100%;
  padding: 1.4rem 0 1.5rem;
  text-align: left;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer__name {
  color: #e5e7eb;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none !important;
}

.footer__name:hover {
  color: #f9fafb;
}

.footer__tag {
  margin: 0;
  max-width: 30ch;
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer__brand .footer__socialshare {
  margin-top: 6px;
  justify-content: flex-start;
}

.footer__links--col {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.55rem;
  text-align: left;
}

.footer__heading {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer__bottom {
  width: 100%;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 0.9rem;
  text-align: center;
}

.footer__bottom p {
  margin: 0;
}

html[data-theme="light"] .footer__name {
  color: #0f172a;
}

html[data-theme="light"] .footer__name:hover {
  color: #1e293b;
}

html[data-theme="light"] .footer__bottom {
  border-top-color: rgba(15, 23, 42, 0.12);
}

@media (max-width: 980px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 24px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* The shared application footer keeps one concise set of useful destinations.
   Older editorial pages retain their existing column styles above. */
.footer__inner--simple {
  --footer-ink: var(--guide-ink, #e8eaed);
  --footer-muted: var(--guide-muted, #bdc1c6);
  --footer-line: var(--guide-line, #5f6368);
  --footer-hover-ink: var(--guide-paper, #202124);
  padding-top: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: .5rem;
}

html[data-theme="light"] .footer__inner--simple {
  --footer-ink: var(--guide-ink, #202124);
  --footer-muted: var(--guide-muted, #5f6368);
  --footer-line: var(--guide-line, #dadce0);
  --footer-hover-ink: var(--guide-paper, #fff);
}

.footer__main {
  display: grid;
  grid-template-columns: minmax(200px, .95fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 2rem 3rem;
  padding-bottom: 2.5rem;
  text-align: left;
}

.site-footer .footer__inner--simple .footer__name {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  color: var(--footer-ink) !important;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.2;
  text-decoration: none !important;
}

.footer__inner--simple .footer__name img {
  flex: 0 0 40px;
  transition: transform .28s ease;
}

.footer__inner--simple .footer__name:hover img {
  transform: rotate(22deg);
}

.footer__links--simple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem .75rem;
  justify-content: start;
  text-align: left;
}

.site-footer .footer__inner--simple .footer__links a {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: .6rem .8rem;
  border-radius: .55rem;
  color: var(--footer-ink) !important;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none !important;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.site-footer .footer__inner--simple .footer__links a::after {
  content: none;
}

.site-footer .footer__inner--simple .footer__links a:hover {
  color: var(--footer-hover-ink) !important;
  background-color: var(--footer-ink);
  transform: translateY(-2px);
}

.footer__inner--simple a:focus-visible {
  outline: 2px solid var(--footer-ink);
  outline-offset: 3px;
}

.site-footer .footer__inner--simple .footer__bottom {
  border-top-color: var(--footer-line);
  padding-top: 1.15rem;
  text-align: left;
}

.site-footer .footer__inner--simple .footer__bottom p {
  color: var(--footer-muted) !important;
  font-size: .75rem;
}

@media (max-width: 720px) {
  .footer__main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 1.75rem;
  }

  .footer__links--simple {
    gap: .2rem .35rem;
  }

  .site-footer .footer__inner--simple .footer__links a {
    padding-inline: .55rem;
  }
}

@media (max-width: 380px) {
  .footer__links--simple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer__inner--simple .footer__name img,
  .footer__inner--simple .footer__name:hover img,
  .site-footer .footer__inner--simple .footer__links a,
  .site-footer .footer__inner--simple .footer__links a:hover {
    transition: none;
    transform: none;
  }
}
