/* Site footer (lib/footer.js): the five categories set large with their article counts, the red
   logo, tagline and "Advertise with us" button, and a legal bar.
   Light grey with a black legal bar; in the dark scheme the grey becomes dark grey (a light band would
   glare under a dark page) and the bar stays black. */
.cm-footer {
  --cmf-bg: #f4f4f4;
  --cmf-ink: #0a0a0a;
  --cmf-muted: #6f6f6f;
  --cmf-line: #dedede;
  --cmf-accent: #cc0100;
  --cmf-hover: #cc0100;
  --cmf-bar: #0b0b0b;
  --cmf-bar-ink: #9a9a9a;
  margin: 0;
  padding: 0;
  background: var(--cmf-bg);
  color: var(--cmf-ink);
  font-family: Poppins, sans-serif;
}
[data-scheme="dark"] .cm-footer { --cmf-bg: #2b2b2b; --cmf-ink: #fff; --cmf-muted: #a8a8a8; --cmf-line: #3d3d3d; --cmf-hover: #ff4a42; }
.cm-footer a { color: inherit; text-decoration: none; }
.cm-footer__wrap { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; box-sizing: border-box; }

.cm-footer__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 60px; align-items: end; padding-top: 56px; padding-bottom: 44px; }
.cm-footer__stack { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.cm-footer__stack a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--cmf-line); font-size: 2rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; text-transform: uppercase; transition: color .15s; }
.cm-footer__stack a span { flex: none; font-family: Lato, sans-serif; font-size: .8rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--cmf-muted); transition: color .15s; }
.cm-footer__stack a:hover, .cm-footer__stack a:focus-visible { color: var(--cmf-hover); }
.cm-footer__stack a:hover span, .cm-footer__stack a:focus-visible span { color: var(--cmf-hover); }

.cm-footer__logo { display: inline-block; }
.cm-footer__logo img { display: block; height: 44px; width: auto; max-width: 100%; }
.cm-footer__logo-dark { display: none !important; }
[data-scheme="dark"] .cm-footer__logo-dark { display: block !important; }
[data-scheme="dark"] .cm-footer__logo-light { display: none !important; }
.cm-footer__tagline { margin: 14px 0 0; max-width: 34ch; font-family: Lato, sans-serif; font-size: .9rem; line-height: 1.6; color: var(--cmf-muted); }
.cm-footer__button { display: inline-flex; align-items: center; height: 42px; margin-top: 22px; padding: 0 18px; background: var(--cmf-accent); color: #fff !important; font-size: .82rem; font-weight: 600; transition: filter .2s; }
.cm-footer__button:hover, .cm-footer__button:focus-visible { filter: brightness(.9); }

/* black legal bar, full width */
.cm-footer__bar { background: var(--cmf-bar); }
.cm-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 18px; padding-bottom: 18px; font-family: Lato, sans-serif; font-size: .8rem; color: var(--cmf-bar-ink); }
.cm-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.cm-footer__bottom a:hover, .cm-footer__bottom a:focus-visible { color: #fff; }
.cm-footer a:focus-visible { outline: 2px solid var(--cmf-hover); outline-offset: 3px; }

/* tablet and phone: logo block first, then the categories */
@media (max-width: 899px) {
  .cm-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 32px; }
  .cm-footer__side { order: -1; }
  .cm-footer__stack a { font-size: 1.5rem; }
}
@media (max-width: 599px) {
  .cm-footer__logo img { height: 32px; }
  .cm-footer__stack a { font-size: 1.3rem; padding: 7px 0; }
  .cm-footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .cm-footer__stack a, .cm-footer__stack a span, .cm-footer__button { transition: none; } }
