/*
 * Faith Matters v1 — email-safe reset
 *
 * Conservative reset. Every rule here addresses a known
 * client-specific quirk. Do not add anything cosmetic.
 *
 * Outlook desktop uses Word as its renderer; many rules below
 * are paired with conditional comments in template.html that
 * carry MSO-specific overrides.
 */

/* Page-level resets ---------------------------------------- */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100%;
  background: var(--fm-color-page-surround);
}

body {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  font-family: var(--fm-font-serif);
  color: var(--fm-color-body-brown);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.fm-bracket-mobile {
  display: none !important;
}

.fm-bracket-desktop {
  display: table !important;
}

/* Table normalization -------------------------------------- */
table {
  border-collapse: collapse !important;
  mso-table-lspace: 0pt;
  mso-table-rspace: 0pt;
  border-spacing: 0;
}

td {
  padding: 0;
  vertical-align: top;
}

/* Image normalization -------------------------------------- */
img {
  border: 0;
  outline: none;
  text-decoration: none;
  -ms-interpolation-mode: bicubic;
  display: block;
  max-width: 100% !important;
  height: auto !important;
  line-height: 100%;
}

.fm-q-stack {
  display: table;
  width: 100%;
  background: var(--fm-q-green-3);
}

.fm-q-photo-cell {
  display: table-cell;
  width: 250px;
  vertical-align: top;
  background: var(--fm-q-green-5);
}

.fm-q-headline-cell {
  display: table-cell;
  vertical-align: middle;
  padding: 20px 24px 20px 32px;
  color: var(--fm-color-white);
  background: var(--fm-q-green-3);
}

.fm-q-photo-img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  margin: 0 auto;
}

/* Canonical anchor state baseline -------------------------- */
:where(a, a:link, a:visited, a:hover, a:active, a:focus) {
  color: inherit;
  text-decoration: none;
}

:where(a:focus-visible) {
  outline: var(--fm-button-stroke-w, 2px) solid var(--fm-color-gold, #A27E2D);
  outline-offset: var(--fm-button-stroke-w, 2px);
}

/* Yahoo + Apple Mail auto-link suppression
 * Apple Mail auto-detects dates / addresses / phone numbers
 * and rewrites them as blue links. Disable globally.        */
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

/* Block-level resets --------------------------------------- */
p {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

/* Gmail wraps content in a div with class .gmail_default which
 * can leak font choices. Force inherit.                     */
div.gmail_default {
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
}

@media screen and (max-width: 600px) {
  .fm-bracket-desktop {
    display: none !important;
  }

  .fm-bracket-mobile {
    display: table !important;
  }

  .fm-wrapper table[width="61"],
  .fm-wrapper td[width="61"] {
    width: 21px !important;
  }

  .fm-wrapper td[width="60"] {
    width: 20px !important;
  }

  .fm-wrapper .fm-virtue td[height="29"][align="center"] {
    padding: 0 12px !important;
    font-size: 22px !important;
    line-height: 29px !important;
    white-space: nowrap !important;
  }

  .fm-q-stack {
    display: block !important;
    width: 100% !important;
  }

  .fm-q-photo-cell {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  .fm-q-headline-cell {
    display: block !important;
    width: auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
    padding: 20px 24px !important;
  }

  .fm-q-photo-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}
