/**
 * article.css
 *
 * Shared article layout and typography: blog posts and neighborhood guides (views/blog-post.php), the new construction page and the
 * affordability page's copy. Loaded after the page's own css (layouts/head.php). Palette as the rest of the site: #12233D headings,
 * #3B4A60 body, #E2E8F0 borders, #1E40AF accent.
 *
 * Width: the page wrapper is the site container (the --wrap-container / --wrap-gutter that css/nav.css sets for the page), so the
 * article's edges line up with the nav and footer. Everything inside starts on that wrapper's left edge.
 *
 * Layout switch (article-layout.php, ARTICLE_LAYOUT): the wrapper carries article-layout--full (text spans the container) or
 * article-layout--sidebar (from 1024px: text column + sticky table of contents and contact card; below that one column).
 */

.article-layout {
  --article-text: #3B4A60;
  --article-head: #12233D;
  --article-line: #E2E8F0;
  --article-accent: #1E40AF;
  --article-side-w: 320px;
  --article-gap: 48px;
}

/* ---- Column structure ---- */
.article-cols {
  display: block;
}

.article-main {
  min-width: 0;
}

.article-side {
  display: none;
}

@media (min-width: 1024px) {
  .article-layout--sidebar .article-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--article-side-w);
    gap: var(--article-gap);
    align-items: start;
  }

  .article-layout--sidebar .article-side {
    display: block;
    position: sticky;
    top: 96px;
  }

  /* the sidebar already carries the contact card */
  .article-layout--sidebar .article-card--end {
    display: none;
  }
}

/* ---- Title, date, hero (blog posts) ---- */
.blog-wrap .blog-post-title,
.nc-heading {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--article-head, #12233D);
}

.blog-wrap .blog-post-date,
.article-date {
  margin: 0 0 24px;
  font-size: 14px;
  color: #6B7A90;
}

.blog-wrap .blog-post-hero {
  margin: 0 0 32px;
}

.blog-wrap .blog-post-hero img {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

@media (min-width: 900px) {
  .blog-wrap .blog-post-title,
  .nc-heading {
    font-size: 38px;
  }

  .blog-wrap .blog-post-hero img {
    aspect-ratio: 21 / 9;
  }
}

/* ---- Prose: one scale for every article ---- */
.article-prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--article-text, #3B4A60);
}

@media (min-width: 1024px) {
  .article-prose {
    font-size: 18px;
  }
}

.article-prose > :first-child,
.article-prose > .blog-post-body > :first-child {
  margin-top: 0;
}

.article-prose h2 {
  margin: 48px 0 16px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--article-head, #12233D);
  scroll-margin-top: 96px;
}

.article-prose h3 {
  margin: 32px 0 12px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--article-head, #12233D);
}

.article-prose h4 {
  margin: 24px 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--article-head, #12233D);
}

@media (min-width: 900px) {
  .article-prose h2 { font-size: 30px; }
  .article-prose h3 { font-size: 23px; }
}

.article-prose p,
.article-prose ul,
.article-prose ol,
.article-prose blockquote {
  margin: 0 0 20px;
}

.article-prose p,
.article-prose li {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.article-prose ul,
.article-prose ol {
  padding-left: 26px;
}

.article-prose li {
  margin: 0 0 8px;
}

.article-prose a {
  color: var(--article-accent, #1E40AF);
}

.article-prose blockquote {
  padding: 4px 18px;
  border-left: 3px solid var(--article-line, #E2E8F0);
  color: #5B6A80;
}

.article-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ---- Tables and cards: container width; a table scrolls sideways inside its own box ---- */
.article-prose .blog-snapshot {
  margin: 28px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--article-line, #E2E8F0);
  border-radius: 8px;
}

.article-prose .blog-snapshot-table {
  width: 100%;
  min-width: 560px;
  font-size: 16px;
  line-height: 1.5;
}

.article-prose .blog-snapshot-note {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.article-prose .blog-stats-box,
.article-prose .blog-embedded-listings-block {
  margin: 28px 0;
}

.article-prose .blog-stats-box {
  border-radius: 8px;
  padding: 20px 24px;
}

.article-prose .blog-stats-title {
  font-size: 20px;
  line-height: 1.3;
}

.article-prose .blog-post-area-link,
.article-main > .blog-post-area-link {
  margin: 32px 0;
}

/* ---- Sidebar: table of contents + contact card ---- */
.article-side-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7A90;
}

.article-toc {
  margin: 0 0 24px;
  padding: 0 0 4px;
}

.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--article-line, #E2E8F0);
}

.article-toc li {
  margin: 0;
}

.article-toc a {
  display: block;
  padding: 7px 0 7px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 15px;
  line-height: 1.4;
  color: #4B5A70;
  text-decoration: none;
}

.article-toc a:hover,
.article-toc a:focus-visible,
.article-toc a.is-active {
  color: var(--article-accent, #1E40AF);
  border-left-color: var(--article-accent, #1E40AF);
}

.article-card {
  margin: 40px 0 0;
  padding: 20px;
  border: 1px solid var(--article-line, #E2E8F0);
  border-radius: 8px;
  background: #F4F7FB;
  font-size: 15px;
  line-height: 1.55;
  color: #3B4A60;
}

.article-card--side {
  margin-top: 0;
}

.article-card p {
  margin: 0 0 12px;
  font-size: inherit;
}

.article-card .article-side-title {
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--article-head, #12233D);
}

.article-card p:last-child {
  margin-bottom: 0;
}

.article-prose a.article-card-btn,
.article-card-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: #1E40AF;
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
}

.article-card-btn:hover {
  background: #16327F;
}

.article-card-tel {
  display: inline-block;
  margin-left: 8px;
  padding: 10px 0;
  font-weight: 600;
  color: var(--article-accent, #1E40AF);
}

.article-prose .blog-stats-note {
  font-size: 13px;
  line-height: 1.5;
}

/* the card's button keeps white text inside pages whose own css colours every link (.nc-copy a, .article-prose a) */
.article-layout .article-card a.article-card-btn,
.article-layout .article-card a.article-card-btn:visited {
  color: #FFFFFF;
}
