/**
 * 2MM Modern Leaky Paywall
 *
 * Scope: Leaky Paywall's standard article-limit wrapper only.
 * No JavaScript and no changes to access, metering, or destination URLs.
 */

body .leaky_paywall_message_wrap {
  --tmm-lp-brand: #009ca6;
  --tmm-lp-action: #006f76;
  --tmm-lp-action-hover: #00585e;
  --tmm-lp-ink: #101828;
  --tmm-lp-copy: #475467;
  --tmm-lp-surface: #f3fbfb;
  --tmm-lp-rule: #ccebed;

  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 660px;
  margin: 3rem auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* A deliberate end-of-preview transition, adapted from modern editorial gates. */
body .leaky_paywall_message_wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.72) 55%,
    #ffffff 100%
  );
}

/* Remove Leaky Paywall's legacy nested grey-box presentation. */
body .leaky_paywall_message_wrap #leaky_paywall_message {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tmm-lp-ink);
  font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-align: initial;
}

.tmm-lp-gate,
.tmm-lp-gate *,
.tmm-lp-gate *::before,
.tmm-lp-gate *::after {
  box-sizing: border-box;
}

.tmm-lp-gate {
  overflow: hidden;
  border: 1px solid var(--tmm-lp-rule);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.07);
  color: var(--tmm-lp-ink);
  text-align: center;
}

.tmm-lp-gate__account {
  margin: 0 !important;
  padding: 1rem 1.25rem 1.125rem;
  color: var(--tmm-lp-copy) !important;
  font-size: 0.9375rem !important;
  line-height: 1.5 !important;
}

body #leaky_paywall_message .tmm-lp-gate__account a,
body #leaky_paywall_message .tmm-lp-gate__account a:visited {
  color: var(--tmm-lp-action) !important;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

body #leaky_paywall_message .tmm-lp-gate__account a:hover {
  color: var(--tmm-lp-action-hover) !important;
}

.tmm-lp-gate__panel {
  padding: clamp(2rem, 6vw, 3rem) clamp(1.25rem, 7vw, 3.5rem)
    clamp(2.25rem, 6vw, 3.25rem);
  border-top: 4px solid var(--tmm-lp-brand);
  background: var(--tmm-lp-surface);
}

.tmm-lp-gate__eyebrow {
  margin: 0 0 0.75rem !important;
  color: var(--tmm-lp-action) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tmm-lp-gate__title {
  max-width: 34rem;
  margin: 0 auto 1rem !important;
  color: var(--tmm-lp-ink) !important;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: clamp(1.75rem, 4vw, 2.25rem) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em;
}

.tmm-lp-gate__copy {
  max-width: 34rem;
  margin: 0 auto !important;
  color: var(--tmm-lp-copy) !important;
  font-size: 1.0625rem !important;
  line-height: 1.65 !important;
}

body #leaky_paywall_message .tmm-lp-gate__cta,
body #leaky_paywall_message .tmm-lp-gate__cta:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 1.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--tmm-lp-action);
  border-radius: 999px;
  background: var(--tmm-lp-action);
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
}

body #leaky_paywall_message .tmm-lp-gate__cta:hover {
  border-color: var(--tmm-lp-action-hover);
  background: var(--tmm-lp-action-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

body #leaky_paywall_message .tmm-lp-gate a:focus-visible {
  outline: 3px solid #70d3d8;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  body .leaky_paywall_message_wrap {
    margin: 2.25rem auto 2.75rem;
  }

  body .leaky_paywall_message_wrap::before {
    height: 64px;
  }

  .tmm-lp-gate {
    border-radius: 12px;
  }

  .tmm-lp-gate__account {
    padding: 0.875rem 1rem 1rem;
  }

  body #leaky_paywall_message .tmm-lp-gate__cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body #leaky_paywall_message .tmm-lp-gate__cta {
    transition: background-color 160ms ease, border-color 160ms ease,
      color 160ms ease, transform 160ms ease;
  }
}

@media (forced-colors: active) {
  .tmm-lp-gate,
  .tmm-lp-gate__panel,
  body #leaky_paywall_message .tmm-lp-gate__cta {
    border: 2px solid CanvasText;
  }
}

