/* ==========================================================
   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: 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 18px 20px;
    border-radius: 24px;
    color: #2a1b12;
    background:
      radial-gradient(155px 155px at 100% 0%, rgba(255, 236, 153, 0.54), transparent 68%),
      radial-gradient(190px 190px at 0% 100%, rgba(255, 110, 88, 0.28), transparent 74%),
      linear-gradient(155deg, #fff7df 0%, #ffd9b4 52%, #ffc3b8 100%);
    border: 1px solid rgba(219, 119, 79, 0.16);
    box-shadow: 0 18px 44px rgba(190, 97, 55, 0.14);
    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.58);
    border: 0;
    border-radius: 999px;
    color: #7e3f18;
    cursor: pointer;
    display: inline-flex;
    font-size: 18px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 28px;
    z-index: 2;
  }

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

  .news-rail-ad__close:focus-visible{
    outline: 2px solid #7e3f18;
    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: 18px;
    right: 18px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f06d3f 0%, #f2b94b 100%);
    opacity: 0.95;
  }

  .news-rail-ad__kicker{
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93471d;
    background: rgba(255, 247, 232, 0.78);
    border: 1px solid rgba(201, 117, 61, 0.18);
  }

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

  .news-rail-ad__brand{
    padding-right: 34px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(23, 43, 35, 0.84);
  }

  .news-rail-ad__headline{
    font-size: 24px;
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-wrap: balance;
    color: #7f2318;
  }

  .news-rail-ad__copy{
    margin-top: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(71, 44, 29, 0.88);
  }

  .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(190, 97, 55, 0.18);
  }

  .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: #f8f6f0;
    background:
      radial-gradient(150px 150px at 88% 12%, rgba(209, 181, 115, 0.26), transparent 70%),
      radial-gradient(170px 170px at 8% 100%, rgba(111, 93, 59, 0.22), transparent 72%),
      linear-gradient(168deg, #221d17 0%, #18140f 54%, #110d09 100%);
    border-color: rgba(219, 198, 151, 0.24);
    box-shadow: 0 18px 36px rgba(17, 13, 9, 0.34);
  }

  .news-rail-ad--hag-expert .news-rail-ad__kicker{
    color: rgba(252, 248, 239, 0.96);
    background: rgba(196, 168, 109, 0.16);
    border-color: rgba(215, 190, 139, 0.26);
  }

  .news-rail-ad--hag-expert .news-rail-ad__brand{
    color: rgba(244, 234, 212, 0.92);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

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

  .news-rail-ad--hag-expert .news-rail-ad__copy{
    color: rgba(240, 230, 209, 0.92);
  }

  .news-rail-ad--hag-expert .news-rail-ad__badge{
    color: #2d2314;
    background: linear-gradient(180deg, #ead8aa 0%, #d2b06f 100%);
  }

  .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;
  }
}
