/*
 * Municipio's small button size hardcodes letter-spacing with two class selectors.
 * Matching that specificity lets the Customizer variable override it without replacing markup.
 */
.c-button.c-button--sm {
  letter-spacing: var(--letter-spacing-button, 0.1rem);
}

/*
 * Municipio owns the drawer layout and applies the saved Customizer values as
 * modifiers. These two extension modifiers only add the missing light palette.
 */
.c-drawer.c-drawer--light,
.c-drawer.c-drawer--light .site-nav-mobile__primary > .c-nav__item,
.c-drawer.c-drawer--light .c-drawer__header {
  --drawer-background: var(--color-background, var(--color-white, #ffffff));
}

.c-drawer.c-drawer--duotone.c-drawer--duotone-light,
.c-drawer.c-drawer--duotone.c-drawer--duotone-light .site-nav-mobile__secondary > .c-nav__item {
  --drawer-duotone-background: var(--color-background, var(--color-white, #ffffff));
}

.c-drawer.c-drawer--light,
.c-drawer.c-drawer--duotone.c-drawer--duotone-light .site-nav-mobile__secondary {
  --color-link: var(--color-base, var(--color-black, #000000));
  --color-link-hover: var(--color-base, var(--color-black, #000000));
  --color-link-active: var(--color-base, var(--color-black, #000000));
  --color-link-visited: var(--color-base, var(--color-black, #000000));
  --color-link-visited-hover: var(--color-base, var(--color-black, #000000));
  --icon-color: var(--color-base, var(--color-black, #000000));
  color: var(--color-base, var(--color-black, #000000));
}

/*
 * Municipio Extended (LTS) added an intentional 4rem gap above the footer,
 * with a matching compensation on the bottom sidebar so the gap stays 4rem
 * whether or not that sidebar renders (source: municipio-se/wp-plugin-
 * municipio-extended@a0db6da). Modern Municipio has neither rule. Reproduced
 * here with the styleguide's global spacing token (--base). The compiled
 * theme bundle never actually declares --base as a custom property (verified
 * live: 5253 var(--base, ...) usages, 0 definitions), so every other rule in
 * the styleguide reads it through a literal fallback instead of relying on
 * inheritance — matched here with the same 8px fallback (0.5rem at the
 * default 16px root) so calc(var(--base) * 8) doesn't silently resolve to an
 * invalid declaration and drop to 0.
 */
.site-footer {
  margin-top: calc(var(--base, 8px) * 8);
}

.sidebar-bottom-sidebar {
  margin-top: calc(var(--base, 8px) * 8);
  margin-bottom: calc(var(--base, 8px) * -8);
}

/*
 * A content area placed inside the readable article must remain inside that
 * article. Municipio's o-grid--stretch utility otherwise makes nested grids
 * viewport-wide, even though their module wrapper inherits the article width.
 */
.municipio-theme-extensions-content-area--inside .o-grid.o-grid--stretch {
  width: 100%;
  max-width: 100%;
  left: auto;
  right: auto;
  transform: none;
}

/*
 * Municipio centers readable articles with cross-axis auto margins inside a
 * column flexbox. Those margins disable the flex item's normal stretch and can
 * make a short article shrink to its contents. Restore the available width;
 * Municipio's own max-width still applies --container-width-content.
 */
.c-article.c-article--readable-width.u-margin__x--auto {
  width: 100%;
}
