/* ==========================================================================
   Article Styles
   ========================================================================== */

@media (min-width: 580px) {
  .article-content img.md-w-auto {
    width: auto !important;
  }
}

article {
  width: 100%;

  header,
  .w-article-col,
  .header-info {
    max-width: 880px;
  }

  .hero-2-1 img {
    aspect-ratio: 2;
    object-fit: cover;
    object-position: center;
  }
  .article-hero {
    margin-bottom: 3rem;

    img {
      width: 100%;
      height: auto;
      /* aspect-ratio: 2; */
      object-fit: cover;
      object-position: center;
    }
  }
}

.aspect-2-1 {
  img {
    aspect-ratio: 2;
    object-fit: cover;
    object-position: center;
  }
}

.post-article-column {
  max-width: 1100px;
}

img.publication-logo {
  display: block;
  max-height: 2rem;
  height: 2rem;
  width: auto;
  margin-bottom: 0.5em;
  max-width: 100%;
}
img.publication-nsd {
  max-height: 3.5rem;
  height: 3.5rem;
}
img.publication-rwm {
  max-height: 3.5rem;
  height: 3.5rem;
}
.entry-title .publication-logo {
  max-height: 4rem;
  height: 4rem;
}
.entry-title {
  .publication-rwm {
    max-height: 4.5rem;
    height: 4.5rem;
  }
  .publication-nsd {
    max-height: 4.5rem;
    height: 4.5rem;
  }
}
.entry-title .publication-morning-briefing,
.entry-title .publication-wcm {
  max-height: 2.5rem;
}
.entry-title .publication-wcm {
  max-height: 2.25rem;
}

/* Article Category */
.article-category {
  position: relative;
  /* color: var(--color-text-base); */
  color: var(--color-action);
  font-size: 0.95em;
  display: inline-block;
  line-height: 1;
  margin-bottom: 0.5em;
  font-weight: 700;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0;
  text-decoration: none;
  background-color: unset;
  padding: unset;

  a {
    text-decoration: none;
    color: var(--color-action);

    &:hover {
      text-decoration: none;
      color: var(--color-action-dark);
      background-color: unset;
    }
  }

  &:hover, &:focus {
    color: var(--color-action-dark);
    background-color: unset;
  }
}

/* Article Info */
.article-info {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1;
}

.article-publish-date {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Share Utilities */
ul.share-utilities {
  margin-bottom: 0;

  &:before {
    content: 'SHARE:';
    display: inline-block;
    margin-right: 0.25em;
    letter-spacing: 0.05em;
  }

  > li {
    font-size: 1.5rem;
    color: var(--color-text-base);

    &:hover {
      color: var(--color-action);
    }
  }
}

.list-inline-item:not(:last-child) {
  margin-right: .125rem;
}

/* Article Body */

.max-width-xl {
  @media(min-width: 1200px) {
    max-width: calc(100% - 600px);
  }
}

.article-body {

  line-height: 1.61803399;
  max-width: calc(880px + 6rem);
  margin-left: auto;
  margin-right: auto;

  > * {
    max-width: 100%;
  }

  > :not(.article-hero, figure, .widget_ai_ad_widget),
  figure.blockquote-figure {
    max-width: calc(1.2285 * 33rem);
    margin-left: auto;
    margin-right: auto;
  }

  > :not(.widget_ai_ad_widget, .ad-widget-in-content) {
    margin-bottom: 1.61803399em;
  }

  .ad-widget-in-content {
    margin: 0 auto !important;
  }

  .widget_ai_ad_widget > div > div, .ad-widget-in-content > div > div {
    
    width: 100% !important;
    max-width: 100%;
    padding: 2rem 0;
    margin: calc(1.61803399em * 0.5) auto calc(1.61803399em * 1.5) !important;
    border-top: 1px solid var(--color-border) !important;
    border-bottom: 1px solid var(--color-border) !important;

    &:before {
      margin-top: -13px;
    }

  }

  img {
    max-width: 100%;
    height: auto;
  }

  h2,
  h3 {
    margin-top: calc(1.61803399em * 1.25);
    margin-bottom: calc(1.61803399em * 0.5) !important;
  }

  p:empty {
    display: none;
  }

  figure {

    &:not(.alignleft, .alignright) {
      width: 100% !important;
      max-width: 100% !important;

      img {
        width: 100% !important;
        height: auto;
      }
    }

    figcaption {
      padding: 0.5em 0;
      font-size: smaller;
      color: var(--bs-gray-600);
      border-bottom: 1px solid var(--bs-gray-300);
      line-height: 1.4;
    }

    &.blockquote-figure {
      position: relative;
      padding: 0 1em 0.5em;
      z-index: 1;
      border-bottom: 1px solid var(--bs-gray-300);

      &:before {
        content: '"';
        position: absolute;
        font-size: 10rem;
        z-index: -1;
        right: 0rem;
        top: -4rem;
        color: var(--color-bg-tint);
      }

      .blockquote {
        margin-bottom: 1.5rem;
        font-size: 1.35rem;
        padding-right: 5rem;
        font-family: var(--font-heading);
        font-weight: 500;
      }

      figcaption {
        border-bottom: unset;
        margin-bottom: unset;
        /* Use the sans alt face for the italic — Roboto Slab (base) ships
           no italic cut, so this avoids a synthesized faux italic. */
        font-family: var(--font-ui);
        font-style: italic;
      }
    }
  }
}

div > img,
a > img {
  max-width: 100%;
  height: auto;
}

/* Alignment */
.alignright,
div.alignright {
  max-width: 50% !important;
  float: right;
  margin-left: 1.61803399em !important;
}

.alignleft {
  max-width: 50%;
  float: left;
  margin-right: 1.61803399em;
}

.wp-caption-text {
  color: var(--color-text-muted);
  font-size: 0.75em;
  margin-top: 0.25em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.3;
}

/* Author Byline */
.cm-author-byline {
  font-weight: 500;

  img {
    object-fit: cover;
    object-position: top left;
  }
}

/* Article Right Column */
.right-col {
  display: flex;
  flex-flow: column;

  width: 100%;
  max-width: 950px;

  @media (min-width: 1200px) {

    &,
    > div {
      width: 300px;
    }

  }
}

.next-article {
  margin-top: auto;
  padding-top: 1em;

  @media(min-width: 1200px) {
    padding-left: 1.5em;
    padding-top: unset;
    border-left: 1px solid var(--color-border);
  }
}

.article-label a.link-label {
  text-decoration: none;
  font-weight: 600;
  background-color: var(--color-highlight);
  padding: 0.125em 0.35em;
}

/* Aside */
aside {
  width: 300px;
  display: flex;
  flex-flow: column;
}

/* Media Query */
@media (min-width: 992px) {
  article {
    font-size: 1.22rem;
  }
}


article.category-magazine {

  .right-col,
  .right-col > div,
  .sticky-col,
  .sticky-col > div {
    width: 250px;
    min-width: 250px;
  }

  .sticky-col {
    order: -1;
  }

  .widget_ai_ad_widget {
    margin: 0 auto !important;
  }

  .widget_ai_ad_widget > div > div {
    min-height: 250px;
    margin: calc( 1.61803399em * 3 ) auto !important;
  }

  .issue-menu {
    padding: 1em 0;
    border-top: 3px solid var(--color-border);
    border-bottom: 3px solid var(--color-border);

    h3 {
      margin-top: unset;
      margin-bottom: 0.5em !important;
    }
  }

  .article-body {

    @media(min-width: 1200px) {
      max-width: 1000px;
    }
  }

  .article-hero {
    @media(min-width: 1200px) {
      margin-bottom: 6rem;
    }
  }

}

/* Longform Article */
article.longform {

  .right-col,
  .right-col > div,
  .sticky-col,
  .sticky-col > div {
    width: 250px;
    min-width: 250px;
  }

  header {
    max-width: 100vw;
    border-bottom: unset;
  }

  .article-hero img {
    aspect-ratio: 2.5;
  }

  .deck {
    font-size: 1.1em;
  }

  .article-info {
    max-width: calc(1.2285 * 33rem);
    margin-left: auto;
    margin-right: auto;
  }

  .article-body {

    .ad, .widget_ai_ad_widget > div > div {
      max-width: 100%;
      padding: 2rem 0;
      margin: 5rem auto !important;
      border-top: 1px solid var(--color-border);
      border-bottom: 1px solid var(--color-border);
    }

    .ad-leaderboard {
      width: 100%;
      background-color: unset;
    }

  }

  .issue-menu {
    padding: 1em 0;
    border-top: 3px solid var(--color-border);
    border-bottom: 3px solid var(--color-border);

    h3 {
      margin-top: unset;
      margin-bottom: 0.5em !important;
    }
  }

  .menu-launcher {
    top: 5em;
  }

  .article-menu {
    width: 300px;

    .utility {
      position: absolute;
      top: 0;
      left: -1.75rem;
      background: var(--color-text-inverse);
    }

    li {
      &:not(:last-of-type) {
        margin-bottom: 0.5em;
        padding-bottom: 0.5em;
        border-bottom: 1px solid var(--color-border);
      }

      .post-snippet img {
        width: 120px;
        height: auto;
        margin-right: 0.5em;
        aspect-ratio: 4 / 2.5;
        object-fit: cover;
        object-position: center;
      }
    }
  }
}

@media (min-width: 1200px) {
  .in-this-issue {
    .post-snippet {
      min-width: calc(50% - 2em);
      max-width: calc(50% - 2em);
    }
  }
}

/* ==========================================================================
   Views Site Shell — Views page content styled like a post
   Wrapper markup lives in views-themes/exchange-monitor-site-shell/.
   Matches the single-post reading column (width, type size, line height).
   ========================================================================== */

.views-shell-article {
  .views-shell-body {
    max-width: calc(880px + 6rem);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    font-family: var(--font-body);
    line-height: 1.61803399;

    @media (min-width: 992px) {
      padding-left: 3rem;
      padding-right: 3rem;
    }

    img {
      max-width: 100%;
      height: auto;
    }

    h1 {
      margin-bottom: 1.61803399rem;
    }

    h2,
    h3 {
      margin-top: calc(1.61803399em * 1.25);
      margin-bottom: calc(1.61803399em * 0.5);
    }

    p {
      margin-bottom: 1.61803399em;
    }
  }
}
