/**
 * @file
 * Resets all theme styles inside a code package to browser defaults.
 *
 * Loaded after the theme CSS (see pzd_custom_code_css_alter()). Specificity
 * of these rules is (0,1,0): stronger than the element rules of the theme,
 * weaker than the package CSS, which is prefixed with ".custom-package" at
 * build time (see README.md, build contract). Global theme rules with an ID
 * (#page h1–h3, #page p) exclude .custom-package in the theme itself.
 *
 * all: … does not touch CSS custom properties, so theme variables stay
 * available inside the package.
 */

/*
 * The wrapper starts from initial values, so inherited typography of the
 * theme (font weight, line height, letter spacing, color) does not reach
 * into the package.
 */
.custom-package {
  all: initial;
  display: block;
  /* Exception: the theme font (DIN Next) is kept. */
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Everything inside: browser defaults. */
.custom-package *,
.custom-package::before,
.custom-package::after,
.custom-package *::before,
.custom-package *::after {
  all: revert;
}

/* Exception: the usual box model of modern frontends. */
.custom-package,
.custom-package *,
.custom-package *::before,
.custom-package *::after {
  box-sizing: border-box;
}
