.article-section {
  position: relative;
  background: var(--dark);
  color: var(--text-light);
  overflow: hidden;
}

.article-layout {
  position: relative;
}

/* Mobile-first: .article-content is a single flex column. Text blocks
   (.article-block) and aside items (.article-image-card, .article-highlight-card,
   .article-quick-facts) are interleaved directly in source order -- on mobile
   they just stack in the order they're written, which is why source order
   matters (see the HTML comments marking each item's position). */
.article-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: clamp(3rem, 4vw, 5rem) 0 clamp(4rem, 6vw, 8rem);
  text-align: left;
}

.article-block {
  max-width: 46rem;
}

/* Desktop: promote .article-content to a 2-column grid. Text blocks stay in
   column 1 (a continuous reading column); aside items move to column 2,
   still in source order, so they land roughly beside the text they were
   written next to -- without a second copy of any content anywhere. */
@media (min-width: 992px) {
  .article-content {
    display: grid;
    grid-template-columns: 7fr 5fr;
    column-gap: 2.5rem;
    row-gap: 1.75rem;
    align-items: start;
    position: relative;
  }

  .article-content > .article-block {
    grid-column: 1;
  }

  .article-content > .article-image-card,
  .article-content > .article-highlight-card,
  .article-content > .article-quick-facts {
    grid-column: 2;
  }

  /* Image/highlight cards in column 2 tend to be taller than a single text
     block in column 1 -- since Grid shares row height across both columns,
     an item like this landing in the same row as a short text block forces
     that row to stretch, leaving a gap under the text. Spanning 2 row-slots
     lets the extra height spread across two rows instead of inflating one,
     which meaningfully smooths (though won't perfectly eliminate) gaps. */
  .article-content > .article-image-card,
  .article-content > .article-highlight-card {
    grid-row: span 2;
  }

  /* decorative sidebar background, now a grid item spanning the full height
     of column 2 instead of living inside a separate .article-aside wrapper */
  .article-content::before {
    content: "";
    /* Explicit row-spanning (e.g. grid-row: 1 / 80) forces the grid to
       actually create that many row tracks, and row-gap applies between
       ALL of them even when empty -- that balloons the grid to a huge
       height. Instead, pull this out of grid flow with position: absolute.
       Absolutely-positioned grid children use the named grid-column's
       track as their horizontal containing block when grid-row is left
       auto, and the grid container's full padding box as the vertical
       containing block -- so inset: 0 stretches it exactly across column 2,
       full height, with no row-track guessing and no gap multiplication. */
    position: absolute;
    inset: 0;
    grid-column: 2;
    z-index: 0;
    background-image:
      url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' width='560' height='360' viewBox='0 0 560 360'>\
      <defs>\
        <linearGradient id='bevel' x1='0' y1='0' x2='0' y2='1'>\
          <stop offset='0%' stop-color='rgba(255,255,255,0.14)'/>\
          <stop offset='14%' stop-color='rgba(255,255,255,0.05)'/>\
          <stop offset='92%' stop-color='rgba(0,0,0,0)'/>\
          <stop offset='100%' stop-color='rgba(115,72,35,0.09)'/>\
        </linearGradient>\
          <filter id='stoneNoise'>\
          <feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' seed='8'/>\
          <feColorMatrix type='saturate' values='0'/>\
          <feComponentTransfer>\
            <feFuncA type='table' tableValues='0 0.055'/>\
          </feComponentTransfer>\
        </filter>\
      </defs>\
    \
      <!-- row 1 -->\
      <rect x='-40'   y='0' width='180' height='90' fill='rgba(238,192,150,0.27)'/>\
      <rect x='140' y='0' width='180' height='90' fill='rgba(236,186,118,0.38)'/>\
      <rect x='320' y='0' width='180' height='90' fill='rgba(220,158,92,0.24)'/>\
        <rect x='500' y='0' width='180' height='90' fill='rgba(240,178,112,0.25)'/>\
    \
      <!-- row 2: offset 50px on x-axis -->\
      <rect x='50'  y='90' width='180' height='90' fill='rgba(206,154,90,0.39)'/>\
      <rect x='230' y='90' width='180' height='90' fill='rgba(232,178,112,0.37)'/>\
      <rect x='410' y='90' width='180' height='90' fill='rgba(212,150,84,0.13)'/>\
      <rect x='-130' y='90' width='180' height='90' fill='rgba(222,167,128,0.26)'/>\
    \
      <!-- row 3: offset -40px on x-axis -->\
      <rect x='-40'  y='180' width='180' height='90' fill='rgba(246,204,140,0.34)'/>\
      <rect x='140' y='180' width='180' height='90' fill='rgba(232,178,112,0.32)'/>\
      <rect x='320' y='180' width='180' height='90' fill='rgba(212,150,84,0.16)'/>\
       <rect x='500' y='180' width='180' height='90' fill='rgba(240,178,112,0.35)'/>\
    \
      <!-- row 4: offset 50px on x-axis -->\
      <rect x='50'  y='270' width='180' height='90' fill='rgba(216,183,130,0.21)'/>\
      <rect x='230' y='270' width='180' height='90' fill='rgba(212,168,118,0.27)'/>\
      <rect x='410' y='270' width='180' height='90' fill='rgba(202,160,94,0.23)'/>\
      <rect x='-130' y='270' width='180' height='90' fill='rgba(200,184,138,0.29)'/>\
    \
      <g fill='url(%23bevel)'>\
        <rect x='-40' y='0' width='180' height='90'/>\
        <rect x='140' y='0' width='180' height='90'/>\
        <rect x='320' y='0' width='180' height='90'/>\
        <rect x='500' y='0' width='180' height='90'/>\
            <rect x='50' y='90' width='180' height='90'/>\
        <rect x='230' y='90' width='180' height='90'/>\
        <rect x='-410' y='90' width='180' height='90'/>\
        <rect x='-130' y='90' width='180' height='90'/>\
            <rect x='-40' y='180' width='180' height='90'/>\
        <rect x='140' y='180' width='180' height='90'/>\
          <rect x='-320' y='180' width='180' height='90'/>\
              <rect x='50' y='270' width='180' height='90'/>\
        <rect x='230' y='270' width='180' height='90'/>\
        <rect x='-410' y='270' width='180' height='90'/>\
        <rect x='-130' y='270' width='180' height='90'/>\
      </g>\
    \
      <g stroke='rgba(255,242,214,0.93)' stroke-width='1'>\
        <path d='M0 90 H560'/>\
        <path d='M140 0 V90 M320 0 V90 M50 90 V180 M230 90 V180 M410 90 V180'/>\
      </g>\
    </svg>"),
      radial-gradient(circle at 80% 80%, rgba(220,150,70,0.20), transparent 44%),
      linear-gradient(135deg, rgba(255,255,255,0.07), rgba(190,100,40,0.10));

    background-size:
      560px 360px,
      auto,
      auto;
  }

  .article-content > .article-image-card,
  .article-content > .article-highlight-card,
  .article-content > .article-quick-facts {
    position: relative;
    z-index: 1;
  }
}

.article-block h1 {
  max-width: 25ch;
  margin-bottom: 2rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.article-block h2,
.article-highlight-card h2,
.article-cta-inner h2 {
  margin-bottom: 1rem;
  line-height: 1.15;
}

.article-block h3 {
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  font-size: 1.1rem;
  color: var(--primary);
}

.article-block p,
.article-highlight-card p,
.article-cta-inner p {
  line-height: 1.75;
  opacity: .88;
}

.article-block .lead {
  font-size: 1.1rem;
  opacity: .95;
}

.article-block .table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: .85rem;
}
.article-block .table > :not(caption) > * > * {
  background-color: rgba(0,0,0,0);
}
.article-block .table th {
  background-color: var(--secondary);
}
.article-block .table tr:nth-child(even) {
  background-color: rgba(0,0,0,.05);
}

.section-kicker {
  margin-bottom: .75rem;
  color: var(--primary);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* right column */

.article-aside {
  position: relative;
  min-height: 100%;
}

.article-side-stack {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-around;
  gap: 1.25rem;
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.article-image-card,
.article-highlight-card {
  width: min(100%, 28rem);
  margin: 0 auto 1rem;
  border: 1px solid rgba(255,255,255,0.75);
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(5px);
}

@media (min-width: 992px) {
  /* Direct grid children of .article-content (right-hand column). Inset by
     1rem on each side rather than filling the track edge-to-edge -- keeps
     the asides centred in column 2 with an even gutter, and lets the brick
     background (.article-content::before, which does span the full track
     via inset: 0) show through as a frame around them. */
  .article-content > .article-image-card,
  .article-content > .article-highlight-card,
  .article-content > .article-quick-facts {
    width: calc(100% - 4rem);
    margin-inline: auto;
  }

  .article-content > .article-image-card,
  .article-content > .article-highlight-card {
    margin-block: 0;
  }
}

.article-image-card {
  margin-bottom: 0;
  overflow: hidden;
}

.article-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.article-image-caption {
  padding: 0.5rem;
    color: --var(--text-dark);
  font-size: .75rem;
  opacity: .8;
}

.article-highlight-card {
  padding: 1.5rem;
}
.article-highlight-card h2 {
    font-size: clamp(1.75rem, 1.33rem + 0.45vw, 1.75rem);
}
/* CTA parallax */

.article-cta-parallax {
  position: relative;
  padding: clamp(5rem, 9vw, 8rem) 0;
  background:
    linear-gradient(rgba(10,10,10,.45), rgba(10,10,10,.65)),
    url("/assets/img/insurance/insurance.webp") center / cover no-repeat fixed;
  color: var(--text-light);
}

.article-cta-shade {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,.2);
  pointer-events: none;
}

.reveal {
  opacity: 0;
  visibility: hidden;
}

.reveal.is-visible {
  opacity: 1;
  visibility: visible;
  animation-name: fadeIn;
  animation-duration: .75s;
  animation-fill-mode: both;
}

.article-side-stack .reveal.is-visible {
  animation-name: fadeInUp;
  animation-duration: 0.95s;
}

.article-cta-inner.reveal.is-visible {
  animation-name: fadeIn;
  animation-duration: 1.1s;
}


/* progress bar */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,.08);
}

#readingProgressBar {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--primary);
}

/* anchor nav */

.article-anchor-nav {
  position: sticky;
  top: 5rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  padding: .75rem;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
}

.article-anchor-nav a {
  display: inline-flex;
  padding: .4rem .7rem;
  color: var(--text-light);
  font-size: .8rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.12);
}

.article-anchor-nav a:hover,
.article-anchor-nav a:focus-visible,
.article-anchor-nav a.active {
  color: var(--dark);
  background: var(--primary);
  border-color: var(--primary);
}


/* drop cap */

.article-dropcap::first-letter {
  float: left;
  margin: .08em .12em 0 0;
  color: var(--primary);
  font-size: 4.6rem;
  line-height: .78;
  font-weight: 700;
}


/* quick fact cards */
.article-quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
  margin: .5rem 0 1.75rem;
}

.quick-fact-card {
  padding: 1rem;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.75);
}

.quick-fact-label {
  display: block;
  margin-bottom: .45rem;
  color: var(--primary);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.quick-fact-card strong {
  display: block;
  margin-bottom: .35rem;
  color: var(--text-light);
  font-size: 1rem;
}

.quick-fact-card p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.55;
  opacity: .82;
}



@media (max-width: 767.98px) {
  .article-quick-facts {
    grid-template-columns: 1fr;
  }
}



@media (max-width: 767.98px) {
  .article-anchor-nav {
    position: relative;
    top: auto;
  }

  .article-dropcap::first-letter {
    font-size: 3.8rem;
  }

  .section-cta,
  .section-cta .container-full {
    min-height: 60vh;
  }
}


@media (max-width: 991.98px) {
  .article-side-stack {
    padding: 2rem 0;
  }

  .article-image-card,
  .article-highlight-card {
    width: 100%;
  }

  .article-cta-parallax {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    visibility: visible;
    animation: none !important;
  }

  .article-cta-parallax {
    background-attachment: scroll;
  }
}
