/* ==========================================================
   RIGHT RAIL AD (Desktop only)
========================================================== */
.news-rail-ad{
  display: none;
}

@media (min-width: 1580px){
  .news-rail-ad{
    --news-rail-offset-y: 0px;
    display: block;
    position: fixed;
    top: 50%;
    left: calc((100vw - var(--max-width)) / 2 - 308px);
    right: auto;
    transform: translateY(calc(-50% + var(--news-rail-offset-y)));
    z-index: 45;
    will-change: transform;
  }

  .news-rail-ad[hidden]{
    display: none;
  }

  .news-rail-ad__panel{
    position: relative;
    width: 196px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 24px 18px 20px;
    border-radius: 22px;
    color: #163529;
    background:
      radial-gradient(145px 145px at 100% 0%, rgba(255, 214, 102, 0.44), transparent 68%),
      radial-gradient(170px 170px at 0% 100%, rgba(61, 214, 170, 0.22), transparent 72%),
      linear-gradient(145deg, #fff9d7 0%, #dff8e7 48%, #d7f3ff 100%);
    border: 1px solid rgba(34, 120, 91, 0.16);
    box-shadow: 0 18px 42px rgba(20, 83, 68, 0.15);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .news-rail-ad__close{
    appearance: none;
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(22, 53, 41, 0.12);
    border-radius: 999px;
    color: #163529;
    cursor: pointer;
    display: inline-flex;
    font-size: 18px;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    z-index: 2;
  }

  .news-rail-ad__close:hover{
    background: rgba(255, 255, 255, 0.78);
  }

  .news-rail-ad__close:focus-visible{
    outline: 2px solid #1b7f5f;
    outline-offset: 2px;
  }

  .news-rail-ad__panel::after{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 38%, rgba(255, 255, 255, 0.12) 100%);
    pointer-events: none;
  }

  .news-rail-ad__panel::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2fbf8f 0%, #ffd166 50%, #ff7f6e 100%);
    opacity: 0.95;
  }

  .news-rail-ad__kicker{
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #1b7f5f;
  }

  .news-rail-ad__eyebrow{
    margin: 6px 0 0;
    color: #99511f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .news-rail-ad__brand{
    padding-right: 38px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(22, 53, 41, 0.80);
  }

  .news-rail-ad__headline{
    font-size: 23px;
    line-height: 1.08;
    letter-spacing: 0;
    text-wrap: balance;
    color: #173529;
  }

  .news-rail-ad__copy{
    margin-top: 0;
    font-size: 13.5px;
    line-height: 1.58;
    color: rgba(25, 61, 48, 0.86);
  }

  .news-rail-ad__meta{
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(153, 81, 31, 0.86);
  }

  .news-rail-ad__link{
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    align-self: flex-start;
    margin-top: 2px;
    color: #8f2f1a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    cursor: pointer;
  }

  .news-rail-ad__link:hover{
    color: #6d1c0e;
  }

  .news-rail-ad__link:focus-visible{
    outline: 2px solid #8d321d;
    outline-offset: 3px;
    border-radius: 4px;
  }

  .news-rail-ad__panel:hover{
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(20, 83, 68, 0.20);
  }

  .news-rail-ad-modal{
    width: min(100vw - 24px, 560px);
    max-width: 560px;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .news-rail-ad-modal::backdrop{
    background: rgba(9, 20, 16, 0.58);
    backdrop-filter: blur(2px);
  }

  .news-rail-ad-modal__card{
    position: relative;
    padding: 28px 24px 24px;
    border-radius: 24px;
    background:
      radial-gradient(240px 240px at 100% 0%, rgba(242, 207, 111, 0.22), transparent 65%),
      linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
    color: #14281f;
    border: 1px solid rgba(20, 40, 31, 0.10);
    box-shadow: 0 28px 60px rgba(10, 49, 38, 0.24);
  }

  .news-rail-ad-modal__close{
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(20, 40, 31, 0.08);
    color: #173127;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .news-rail-ad-modal__close:hover{
    background: rgba(20, 40, 31, 0.14);
  }

  .news-rail-ad-modal__close:focus-visible{
    outline: 2px solid #173127;
    outline-offset: 2px;
  }

  .news-rail-ad-modal__eyebrow{
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #35624c;
  }

  .news-rail-ad-modal__title{
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #10271d;
  }

  .news-rail-ad-modal__lead{
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.6;
    color: #284438;
  }

  .news-rail-ad-modal__steps,
  .news-rail-ad-modal__list{
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 10px;
    color: #173127;
    line-height: 1.6;
  }

  .news-rail-ad-modal__steps{
    margin-bottom: 18px;
  }

  .news-rail-ad-modal__note{
    padding-top: 16px;
    border-top: 1px solid rgba(20, 40, 31, 0.10);
  }

  .news-rail-ad-modal__subhead{
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.3;
    color: #10271d;
  }

  .news-rail-ad--hag-expert .news-rail-ad__panel{
    color: #163529;
    background:
      radial-gradient(140px 140px at 92% 10%, rgba(255, 209, 102, 0.46), transparent 70%),
      radial-gradient(190px 170px at 0% 100%, rgba(47, 191, 143, 0.24), transparent 72%),
      linear-gradient(150deg, #fff8d6 0%, #e5f8df 46%, #d8f5ff 100%);
    border-color: rgba(38, 138, 105, 0.18);
    box-shadow: 0 18px 38px rgba(20, 83, 68, 0.16);
  }

  .news-rail-ad--hag-expert .news-rail-ad__kicker{
    color: #16835f;
  }

  .news-rail-ad--hag-expert .news-rail-ad__brand{
    color: rgba(22, 53, 41, 0.78);
  }

  .news-rail-ad--hag-expert .news-rail-ad__headline{
    font-size: 23px;
    line-height: 1.1;
    color: #173529;
  }

  .news-rail-ad--hag-expert .news-rail-ad__copy{
    color: rgba(25, 61, 48, 0.86);
  }

  .news-rail-ad--hag-expert .news-rail-ad__badge{
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(22, 53, 41, 0.14);
    color: #b24f36;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .news-rail-ad--hag-expert .news-rail-ad__eyebrow,
  .news-rail-ad--hag-expert .news-rail-ad__meta,
  .news-rail-ad--hag-expert .news-rail-ad__link{
    display: none;
  }
}
