/* Footer (Find your way) template. Tokens only (ds/tokens.css); media queries use the three breakpoints, 48rem, 64rem and 80rem.
   Markup: nav_footer_html() in includes/shell/nav.php, printed by includes/shell/chrome.php. The footer is the container: two columns of topics below 48rem
   of its width, three from 48rem, four from 64rem. */

/* ------------------------------------------------------------ one colour per theme on every page
   The footer uses the same canvas as the page body (--c-canvas when set, else --ds-surface), so the portal's seasonal ground and the footer never
   show two different darks. The always-dark overlay colours of a story page (ds/chakra.css) and the glass shell's veil (ds/glass-shell.css) stop at
   the footer's edge, so news, wisdom and privacy read as 404 and help do. */
html:root footer.ds-footer.ds-footer--chrome[data-ds-footer] {
  --ds-text: unset; --ds-text-muted: unset; --ds-accent: unset; --ds-border: unset; --ds-focus: unset;
  position: relative; isolation: isolate;
  container-type: inline-size;
  background: var(--c-canvas, var(--ds-surface)); color: var(--ds-text);
  border-block-start: 1px solid var(--ds-border);
}
html:root footer.ds-footer.ds-footer--chrome[data-ds-footer]::before,
html:root footer.ds-footer.ds-footer--chrome[data-ds-footer]::after { content: none; }

/* ------------------------------------------------------------ Find your way */
.ds-footer .ds-footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-3) var(--ds-space-5); min-inline-size: 0; }
@container (min-width: 48rem) { .ds-footer .ds-footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-4) var(--ds-space-6); } }
@container (min-width: 64rem) { .ds-footer .ds-footer-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }   /* every group on one row */

/* the outline's h2, read by screen readers only */
.ds-footer .ds-footer-nav__lead { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.ds-footer .ds-footer-nav__col { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--ds-space-2); row-gap: var(--ds-space-1); align-content: start; min-inline-size: 0; }
.ds-footer .ds-footer-nav__icon { display: inline-flex; color: var(--ds-accent); }
.ds-footer .ds-footer-nav__icon .ds-icon { inline-size: var(--ds-space-6); block-size: var(--ds-space-6); }
.ds-footer .ds-footer-nav__heading { margin: 0; font-family: var(--ds-font-ui); font-size: var(--ds-type-h4); line-height: var(--ds-leading-lede); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--ds-text); }
.ds-footer .ds-footer-nav__links { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; min-inline-size: 0; }
.ds-footer .ds-footer-nav__links a { display: flex; align-items: center; min-block-size: var(--ds-touch); color: var(--ds-text); font-size: var(--ds-type-body); line-height: var(--ds-leading-tight); text-decoration: none; overflow-wrap: anywhere; }
.ds-footer .ds-footer-nav__links a:hover { color: var(--ds-accent); text-decoration: underline; text-underline-offset: .15em; }
.ds-footer .ds-footer-nav__links a:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; border-radius: var(--ds-radius-sm); }

/* the identity line, place line and legal row keep to the same left edge under the grid */
.ds-footer--chrome .ds-footer-who { padding-block-start: var(--ds-space-2); border-block-start: 1px solid var(--ds-border); }
